pears.templatestorestaff

Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.

This table stores favourite templates that appear at top of lists

Column Type Null Default Comment
templateid char(20) NOT NULL
staffid char(20) NOT NULL
  • templateid, staffid
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
  • No incoming foreign keys found.
  • No indexes found.
  • No triggers found.
-- 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
  • database/tables/pears_templatestorestaff.txt
  • Last modified: 2026/08/07 19:24
  • by 127.0.0.1