database:tables:pears_companydeptdoctype



pears.CompanyDeptDocType

Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.

Used to set standard Document Types to attach when sending CVs.

Column Type Null Default Comment
CDDTid char(20) NOT NULL
documenttypeid char(20) NULL
departmentid char(2) NULL
companyid char(20) NULL
  • CDDTid
Constraint Columns References Delete/update action
documenttype documenttypeid pears.DocumentType (DocumentTypeID) ON DELETE CASCADE
department departmentid pears.Department (departmentid) ON DELETE CASCADE
company companyid pears.Company (companyid) ON DELETE CASCADE
  • No incoming foreign keys found.
  • No indexes found.
  • No triggers found.
-- IQX database structure split by table
-- Source: IQXDatabaseStructure - with comments.sql
-- Table: "pears"."CompanyDeptDocType"
-- Table comment: Used to set standard Document Types to attach when sending CVs.
-- Statement count: 5
 
CREATE TABLE "pears"."CompanyDeptDocType" (
    "CDDTid"                         CHAR(20) NOT NULL
   ,"documenttypeid"                 CHAR(20) NULL
   ,"departmentid"                   CHAR(2) NULL
   ,"companyid"                      CHAR(20) NULL
   ,PRIMARY KEY ("CDDTid" ASC) 
)
GO
 
 
COMMENT ON TABLE "pears"."CompanyDeptDocType" IS 
	'Used to set standard Document Types to attach when sending CVs.'
GO
 
 
ALTER TABLE "pears"."CompanyDeptDocType"
    ADD FOREIGN KEY "documenttype" ("documenttypeid" ASC)
    REFERENCES "pears"."DocumentType" ("DocumentTypeID")
    ON DELETE CASCADE
GO
 
 
ALTER TABLE "pears"."CompanyDeptDocType"
    ADD FOREIGN KEY "department" ("departmentid" ASC)
    REFERENCES "pears"."Department" ("departmentid")
    ON DELETE CASCADE
GO
 
 
ALTER TABLE "pears"."CompanyDeptDocType"
    ADD FOREIGN KEY "company" ("companyid" ASC)
    REFERENCES "pears"."Company" ("companyid")
    ON DELETE CASCADE
GO
  • database/tables/pears_companydeptdoctype.txt
  • Last modified: 2026/08/07 19:24
  • by 127.0.0.1