====== pears.TemplateGroupTemplate ====== Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace. ===== Description ===== Used in master roster and vacancy limits ===== Columns ===== ^ Column ^ Type ^ Null ^ Default ^ Comment ^ | **TemplateGroupTemplateID** | char(20) | NOT NULL | | | | ShiftTemplateGroupID | char(20) | NULL | | | | TempShiftTemplateID | char(20) | NULL | | | ===== Primary Key ===== * TemplateGroupTemplateID ===== Foreign Keys ===== ^ Constraint ^ Columns ^ References ^ Delete/update action ^ | ShiftTemplateGroup | ShiftTemplateGroupID | [[database:tables:pears_shifttemplategroup|pears.ShiftTemplateGroup (ShiftTemplateGroupID)]] | ON DELETE CASCADE | | TempShiftTemplate | TempShiftTemplateID | [[database:tables:pears_tempshifttemplate|pears.TempShiftTemplate (TempShiftTemplateID)]] | 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"."TemplateGroupTemplate" -- Table comment: Used in master roster and vacancy limits -- Statement count: 4 CREATE TABLE "pears"."TemplateGroupTemplate" ( "TemplateGroupTemplateID" char(20) NOT NULL ,"ShiftTemplateGroupID" char(20) NULL ,"TempShiftTemplateID" char(20) NULL ,PRIMARY KEY ("TemplateGroupTemplateID" ASC) ) go COMMENT ON TABLE "pears"."TemplateGroupTemplate" IS 'Used in master roster and vacancy limits' go ALTER TABLE "pears"."TemplateGroupTemplate" ADD FOREIGN KEY "ShiftTemplateGroup" ("ShiftTemplateGroupID" ASC) REFERENCES "pears"."ShiftTemplateGroup" ("ShiftTemplateGroupID") ON DELETE CASCADE go ALTER TABLE "pears"."TemplateGroupTemplate" ADD FOREIGN KEY "TempShiftTemplate" ("TempShiftTemplateID" ASC) REFERENCES "pears"."TempShiftTemplate" ("TempShiftTemplateID") ON DELETE CASCADE go