====== pears.ShiftTemplateGroup ======
Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.
===== Description =====
For grouping shift templates
===== Columns =====
^ Column ^ Type ^ Null ^ Default ^ Comment ^
| **ShiftTemplateGroupID** | char(20) | NOT NULL | | |
| Description | char(20) | NULL | | |
| CommentText | char(100) | NULL | | |
| DepartmentID | char(2) | NULL | | |
| ClientTempShiftCode | char(12) | NULL | | Allows standard shifts to be customised for clients or groups |
===== Primary Key =====
* ShiftTemplateGroupID
===== Foreign Keys =====
^ Constraint ^ Columns ^ References ^ Delete/update action ^
| department | DepartmentID | [[database:tables:pears_department|pears.Department (departmentid)]] | ON DELETE SET NULL |
===== Referenced By =====
^ Table ^ Constraint ^ Columns ^ Referenced columns ^
| [[database:tables:pears_automatchpersonpreferredshifttype|pears.AutoMatchPersonPreferredShiftType]] | ShiftTemplateGroup | ShiftTemplateGroupID | ShiftTemplateGroupID |
| [[database:tables:pears_templategrouptemplate|pears.TemplateGroupTemplate]] | ShiftTemplateGroup | ShiftTemplateGroupID | ShiftTemplateGroupID |
| [[database:tables:pears_vacancylimit|pears.VacancyLimit]] | ShiftTemplateGroup | ShiftTemplateGroupID | ShiftTemplateGroupID |
===== Indexes =====
* No indexes found.
===== Triggers =====
* No triggers found.
===== Original SQL =====
-- IQX database structure split by table
-- Source: IQXDatabaseStructure - with comments.sql
-- Table: "pears"."ShiftTemplateGroup"
-- Table comment: For grouping shift templates
-- Statement count: 4
CREATE TABLE "pears"."ShiftTemplateGroup" (
"ShiftTemplateGroupID" char(20) NOT NULL
,"Description" char(20) NULL
,"CommentText" char(100) NULL
,"DepartmentID" char(2) NULL
,"ClientTempShiftCode" char(12) NULL
,PRIMARY KEY ("ShiftTemplateGroupID" ASC)
)
go
COMMENT ON COLUMN "pears"."ShiftTemplateGroup"."ClientTempShiftCode" IS
'Allows standard shifts to be customised for clients or groups'
go
COMMENT ON TABLE "pears"."ShiftTemplateGroup" IS
'For grouping shift templates'
go
ALTER TABLE "pears"."ShiftTemplateGroup"
ADD FOREIGN KEY "department" ("DepartmentID" ASC)
REFERENCES "pears"."Department" ("departmentid")
ON DELETE SET NULL
go