pears.templatestoredivision

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

Allows template store to be limited by division

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