pears.DocumentPackDepartment

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

Links Document Packs to Departments. Packs with no record are available for all Departments.

Column Type Null Default Comment
DocumentPackDepartmentID char(20) NOT NULL
DepartmentID char(2) NULL
DocumentPackID char(20) NULL
  • DocumentPackDepartmentID
Constraint Columns References Delete/update action
Department DepartmentID pears.Department (departmentid) ON DELETE CASCADE
DocumentPack DocumentPackID pears.DocumentPack (DocumentPackID) 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"."DocumentPackDepartment"
-- Table comment: Links Document Packs to Departments. Packs with no record are available for all Departments.
-- Statement count: 4
 
CREATE TABLE "pears"."DocumentPackDepartment" (
    "DocumentPackDepartmentID"       CHAR(20) NOT NULL
   ,"DepartmentID"                   CHAR(2) NULL
   ,"DocumentPackID"                 CHAR(20) NULL
   ,PRIMARY KEY ("DocumentPackDepartmentID" ASC) 
)
GO
 
 
COMMENT ON TABLE "pears"."DocumentPackDepartment" IS 
	'Links Document Packs to Departments. Packs with no record are available for all Departments.'
GO
 
 
ALTER TABLE "pears"."DocumentPackDepartment"
    ADD FOREIGN KEY "Department" ("DepartmentID" ASC)
    REFERENCES "pears"."Department" ("departmentid")
    ON DELETE CASCADE
GO
 
 
ALTER TABLE "pears"."DocumentPackDepartment"
    ADD FOREIGN KEY "DocumentPack" ("DocumentPackID" ASC)
    REFERENCES "pears"."DocumentPack" ("DocumentPackID")
    ON DELETE CASCADE
GO
  • database/tables/pears_documentpackdepartment.txt
  • Last modified: 2026/08/07 19:24
  • by 127.0.0.1