Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.
| Column | Type | Null | Default | Comment |
|---|---|---|---|---|
| ComplianceDomainID | char(20) | NOT NULL | ||
| DocumentTypeID | char(20) | NOT NULL | ||
| Behaviour | tinyint | NOT NULL | 1 | 1=required 2=warning 3=score only |
| Score | smallint | NOT NULL | 1 | |
| ExpiryLead | tinyint | NOT NULL | 0 |
| Constraint | Columns | References | Delete/update action |
|---|---|---|---|
| ComplianceDomain | ComplianceDomainID | pears.ComplianceDomain (ComplianceDomainID) | NOT NULL; ON DELETE CASCADE |
| DocumentType | DocumentTypeID | pears.DocumentType (DocumentTypeID) | NOT NULL; ON DELETE CASCADE |
-- IQX database structure split by table -- Source: IQXDatabaseStructure - with comments.sql -- Table: "pears"."ComplianceDocumentType" -- Table comment: -- Statement count: 4 CREATE TABLE "pears"."ComplianceDocumentType" ( "ComplianceDomainID" CHAR(20) NOT NULL ,"DocumentTypeID" CHAR(20) NOT NULL ,"Behaviour" tinyint NOT NULL DEFAULT 1 ,"Score" SMALLINT NOT NULL DEFAULT 1 ,"ExpiryLead" tinyint NOT NULL DEFAULT 0 ,PRIMARY KEY ("ComplianceDomainID" ASC,"DocumentTypeID" ASC) ) GO COMMENT ON COLUMN "pears"."ComplianceDocumentType"."Behaviour" IS '1=required 2=warning 3=score only' GO ALTER TABLE "pears"."ComplianceDocumentType" ADD NOT NULL FOREIGN KEY "ComplianceDomain" ("ComplianceDomainID" ASC) REFERENCES "pears"."ComplianceDomain" ("ComplianceDomainID") ON DELETE CASCADE GO ALTER TABLE "pears"."ComplianceDocumentType" ADD NOT NULL FOREIGN KEY "DocumentType" ("DocumentTypeID" ASC) REFERENCES "pears"."DocumentType" ("DocumentTypeID") ON DELETE CASCADE GO