====== pears.DocumentPack ======
Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.
===== Description =====
Master records for the defined Document Packs.
===== Columns =====
^ Column ^ Type ^ Null ^ Default ^ Comment ^
| **DocumentPackID** | char(20) | NOT NULL | | |
| Description | char(100) | NOT NULL | | |
| ReportID | char(20) | NULL | | |
| Sortorder | smallint | NULL | | |
| Defunct | smallint | NULL | | |
===== Primary Key =====
* DocumentPackID
===== Foreign Keys =====
^ Constraint ^ Columns ^ References ^ Delete/update action ^
| Report | ReportID | [[database:tables:pears_report|pears.report (reportid)]] | ON DELETE SET NULL |
===== Referenced By =====
^ Table ^ Constraint ^ Columns ^ Referenced columns ^
| [[database:tables:pears_docpackvalidation|pears.DocPackValidation]] | DocumentPack | DocumentPackID | DocumentPackID |
| [[database:tables:pears_documentpackdepartment|pears.DocumentPackDepartment]] | DocumentPack | DocumentPackID | DocumentPackID |
| [[database:tables:pears_documentpackreport|pears.DocumentPackReport]] | DocumentPack | DocumentPackID | DocumentPackID |
| [[database:tables:pears_documentpacktype|pears.DocumentPackType]] | DocumentPack | DocumentPackID | DocumentPackID |
===== Indexes =====
* No indexes found.
===== Triggers =====
* No triggers found.
===== Original SQL =====
-- IQX database structure split by table
-- Source: IQXDatabaseStructure - with comments.sql
-- Table: "pears"."DocumentPack"
-- Table comment: Master records for the defined Document Packs.
-- Statement count: 3
CREATE TABLE "pears"."DocumentPack" (
"DocumentPackID" char(20) NOT NULL
,"Description" char(100) NOT NULL
,"ReportID" char(20) NULL
,"Sortorder" smallint NULL
,"Defunct" smallint NULL
,PRIMARY KEY ("DocumentPackID" ASC)
)
go
COMMENT ON TABLE "pears"."DocumentPack" IS
'Master records for the defined Document Packs.'
go
ALTER TABLE "pears"."DocumentPack"
ADD FOREIGN KEY "Report" ("ReportID" ASC)
REFERENCES "pears"."report" ("reportid")
ON DELETE SET NULL
go