pears.ContactDepartment

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

List of Departments offered for Client Contacts (NOT linked to IQX Department records)

Column Type Null Default Comment
ContactDepartmentID char(20) NOT NULL
Name char(50) NOT NULL
DepartmentID char(2) NULL
SortOrder smallint NULL
  • ContactDepartmentID
Constraint Columns References Delete/update action
department DepartmentID pears.Department (departmentid) ON DELETE CASCADE
  • No incoming foreign keys found.
Name Type Columns Detail
ContactDepartment_sortorder Index DepartmentID, SortOrder, Name
  • No triggers found.
-- IQX database structure split by table
-- Source: IQXDatabaseStructure - with comments.sql
-- Table: "pears"."ContactDepartment"
-- Table comment: List of Departments offered for Client Contacts (NOT linked to IQX Department records)
-- Statement count: 4
 
CREATE TABLE "pears"."ContactDepartment" (
    "ContactDepartmentID"            CHAR(20) NOT NULL
   ,"Name"                           CHAR(50) NOT NULL
   ,"DepartmentID"                   CHAR(2) NULL
   ,"SortOrder"                      SMALLINT NULL
   ,PRIMARY KEY ("ContactDepartmentID" ASC) 
)
GO
 
 
COMMENT ON TABLE "pears"."ContactDepartment" IS 
	'List of Departments offered for Client Contacts (NOT linked to IQX Department records)'
GO
 
 
ALTER TABLE "pears"."ContactDepartment"
    ADD FOREIGN KEY "department" ("DepartmentID" ASC)
    REFERENCES "pears"."Department" ("departmentid")
    ON DELETE CASCADE
GO
 
 
CREATE INDEX "ContactDepartment_sortorder" ON "pears"."ContactDepartment"
    ( "DepartmentID","SortOrder","Name" )
GO
  • database/tables/pears_contactdepartment.txt
  • Last modified: 2026/08/07 19:24
  • by 127.0.0.1