pears.templatestorestaff
Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.
Description
This table stores favourite templates that appear at top of lists
Columns
| Column | Type | Null | Default | Comment |
|---|---|---|---|---|
| templateid | char(20) | NOT NULL | ||
| staffid | char(20) | NOT NULL |
Primary Key
- templateid, staffid
Foreign Keys
| Constraint | Columns | References | Delete/update action |
|---|---|---|---|
| templatestore | templateid | pears.templatestore (templateid) | NOT NULL; ON DELETE CASCADE |
| staff | staffid | pears.staff (staffid) | 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"."templatestorestaff" -- Table comment: This table stores favourite templates that appear at top of lists -- Statement count: 4 CREATE TABLE "pears"."templatestorestaff" ( "templateid" CHAR(20) NOT NULL ,"staffid" CHAR(20) NOT NULL ,PRIMARY KEY ("templateid" ASC,"staffid" ASC) ) GO COMMENT ON TABLE "pears"."templatestorestaff" IS 'This table stores favourite templates that appear at top of lists' GO ALTER TABLE "pears"."templatestorestaff" ADD NOT NULL FOREIGN KEY "templatestore" ("templateid" ASC) REFERENCES "pears"."templatestore" ("templateid") ON DELETE CASCADE GO ALTER TABLE "pears"."templatestorestaff" ADD NOT NULL FOREIGN KEY "staff" ("staffid" ASC) REFERENCES "pears"."staff" ("staffid") ON DELETE CASCADE GO