====== pears.DocumentPackType ======
Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.
===== Description =====
Lists types of Document available in a given pack by default.
===== Columns =====
^ Column ^ Type ^ Null ^ Default ^ Comment ^
| **DocumentPackTypeID** | char(20) | NOT NULL | | |
| DocumentPackID | char(20) | NULL | | |
| DocumentTypeID | char(20) | NULL | | |
| Redacted | smallint | NULL | | |
| Sortorder | smallint | NULL | | |
| Required | smallint | NULL | | |
===== Primary Key =====
* DocumentPackTypeID
===== Foreign Keys =====
^ Constraint ^ Columns ^ References ^ Delete/update action ^
| DocumentPack | DocumentPackID | [[database:tables:pears_documentpack|pears.DocumentPack (DocumentPackID)]] | ON DELETE CASCADE |
| DocumentType | DocumentTypeID | [[database:tables:pears_documenttype|pears.DocumentType (DocumentTypeID)]] | ON DELETE CASCADE |
===== Referenced By =====
* No incoming foreign keys found.
===== Indexes =====
* No indexes found.
===== Triggers =====
* No triggers found.
===== Original SQL =====
-- IQX database structure split by table
-- Source: IQXDatabaseStructure - with comments.sql
-- Table: "pears"."DocumentPackType"
-- Table comment: Lists types of Document available in a given pack by default.
-- Statement count: 4
CREATE TABLE "pears"."DocumentPackType" (
"DocumentPackTypeID" char(20) NOT NULL
,"DocumentPackID" char(20) NULL
,"DocumentTypeID" char(20) NULL
,"Redacted" smallint NULL
,"Sortorder" smallint NULL
,"Required" smallint NULL
,PRIMARY KEY ("DocumentPackTypeID" ASC)
)
go
COMMENT ON TABLE "pears"."DocumentPackType" IS
'Lists types of Document available in a given pack by default.'
go
ALTER TABLE "pears"."DocumentPackType"
ADD FOREIGN KEY "DocumentPack" ("DocumentPackID" ASC)
REFERENCES "pears"."DocumentPack" ("DocumentPackID")
ON DELETE CASCADE
go
ALTER TABLE "pears"."DocumentPackType"
ADD FOREIGN KEY "DocumentType" ("DocumentTypeID" ASC)
REFERENCES "pears"."DocumentType" ("DocumentTypeID")
ON DELETE CASCADE
go