====== pears.ComplianceReferenceType ======
Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.
===== Columns =====
^ Column ^ Type ^ Null ^ Default ^ Comment ^
| **ComplianceDomainID** | char(20) | NOT NULL | | |
| **RefType** | tinyint | NOT NULL | 1 | |
| ReferenceCount | tinyint | NOT NULL | 1 | count of number reference |
| Score | smallint | NOT NULL | 1 | |
===== Primary Key =====
* ComplianceDomainID, RefType
===== Foreign Keys =====
^ Constraint ^ Columns ^ References ^ Delete/update action ^
| ComplianceDomain | ComplianceDomainID | [[database:tables:pears_compliancedomain|pears.ComplianceDomain (ComplianceDomainID)]] | NOT NULL; 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"."ComplianceReferenceType"
-- Table comment:
-- Statement count: 3
CREATE TABLE "pears"."ComplianceReferenceType" (
"ComplianceDomainID" char(20) NOT NULL
,"RefType" tinyint NOT NULL DEFAULT 1
,"ReferenceCount" tinyint NOT NULL DEFAULT 1
,"Score" smallint NOT NULL DEFAULT 1
,PRIMARY KEY ("ComplianceDomainID" ASC,"RefType" ASC)
)
go
COMMENT ON COLUMN "pears"."ComplianceReferenceType"."ReferenceCount" IS
'count of number reference'
go
ALTER TABLE "pears"."ComplianceReferenceType"
ADD NOT NULL FOREIGN KEY "ComplianceDomain" ("ComplianceDomainID" ASC)
REFERENCES "pears"."ComplianceDomain" ("ComplianceDomainID")
ON DELETE CASCADE
go