Show pageOld revisionsBacklinksExport to PDFFold/unfold allBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== pears.CompanyDeptDocType ====== <WRAP center round info> Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace. </WRAP> ===== Description ===== Used to set standard Document Types to attach when sending CVs. ===== Columns ===== ^ Column ^ Type ^ Null ^ Default ^ Comment ^ | **CDDTid** | char(20) | NOT NULL | | | | documenttypeid | char(20) | NULL | | | | departmentid | char(2) | NULL | | | | companyid | char(20) | NULL | | | ===== Primary Key ===== * CDDTid ===== Foreign Keys ===== ^ Constraint ^ Columns ^ References ^ Delete/update action ^ | documenttype | documenttypeid | [[database:tables:pears_documenttype|pears.DocumentType (DocumentTypeID)]] | ON DELETE CASCADE | | department | departmentid | [[database:tables:pears_department|pears.Department (departmentid)]] | ON DELETE CASCADE | | company | companyid | [[database:tables:pears_company|pears.Company (companyid)]] | ON DELETE CASCADE | ===== Referenced By ===== * No incoming foreign keys found. ===== Indexes ===== * No indexes found. ===== Triggers ===== * No triggers found. ===== Original SQL ===== <code sql> -- 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 </code> database/tables/pears_companydeptdoctype.txt Last modified: 2026/08/07 19:24by 127.0.0.1