pears.templatestoredivision
Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.
Description
Allows template store to be limited by division
Columns
| Column | Type | Null | Default | Comment |
|---|---|---|---|---|
| templateid | char(20) | NOT NULL | ||
| divisionid | char(20) | NOT NULL |
Primary Key
- templateid, divisionid
Foreign Keys
| Constraint | Columns | References | Delete/update action |
|---|---|---|---|
| templatestore | templateid | pears.templatestore (templateid) | NOT NULL; ON DELETE CASCADE |
| division | divisionid | pears.Division (divisionid) | 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"."templatestoredivision" -- Table comment: Allows template store to be limited by division -- Statement count: 4 CREATE TABLE "pears"."templatestoredivision" ( "templateid" CHAR(20) NOT NULL ,"divisionid" CHAR(20) NOT NULL ,PRIMARY KEY ("templateid" ASC,"divisionid" ASC) ) GO COMMENT ON TABLE "pears"."templatestoredivision" IS 'Allows template store to be limited by division' GO ALTER TABLE "pears"."templatestoredivision" ADD NOT NULL FOREIGN KEY "templatestore" ("templateid" ASC) REFERENCES "pears"."templatestore" ("templateid") ON DELETE CASCADE GO ALTER TABLE "pears"."templatestoredivision" ADD NOT NULL FOREIGN KEY "division" ("divisionid" ASC) REFERENCES "pears"."Division" ("divisionid") ON DELETE CASCADE GO