pears.TempShiftTemplate
Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.
Description
Definitions of Shift Templates - allowing quick creation of shifts with all necessary timing - grade - skill etc information. Templates remain linked to the created shift.
Columns
| Column | Type | Null | Default | Comment |
|---|---|---|---|---|
| TempShiftTemplateID | char(20) | NOT NULL | ||
| DepartmentID | char(2) | NULL | ||
| ClientTempShiftCode | char(12) | NULL | Allows standard shifts to be customised for clients or groups | |
| TagLocation | char(1) | NULL | Essential skill in P General Questionnaire A Departmental Questionnaire | |
| TagID | char(3) | NULL | For the essential skill | |
| TagChoiceID | char(4) | NULL | For the essential skill | |
| EssentialSkillGradeID | char(4) | NULL | Either grade choice from TagID or choice from GradeTagID | |
| Description | char(50) | NOT NULL | ||
| TimeFrom | time | NULL | ||
| TimeTo | time | NULL | ||
| Moveable | smallint | NULL | 0 | |
| Minutes | smallint | NULL | Fill if shorter spell within the timespan | |
| BreakMinutes | smallint | NULL | ||
| ReferenceRequired | char(1) | NULL | on <E>ntry, <C>onfirmation, <T>imesheet entry. Blank for not required | |
| ClientMustConfirm | smallint | NULL | 0 | |
| GradeTagID | char(3) | NULL | If essential skill is NOT graded list | |
| TempMustConfirm | smallint | NULL | 0 | |
| TempShiftTypeID | char(2) | NULL | ||
| AnalysisCode | char(20) | NULL | ||
| RecoveryHours | smallint | NULL | 0 | |
| ShiftOrderReasonRequired | smallint | NULL | 0 | Will prompt for order reason on new shifts |
| Defunct | smallint | NULL | ||
| SortOrder | smallint | NULL | ||
| ComplianceDomainID | char(20) | NULL |
Primary Key
- TempShiftTemplateID
Foreign Keys
| Constraint | Columns | References | Delete/update action |
|---|---|---|---|
| department | DepartmentID | pears.Department (departmentid) | ON DELETE SET NULL |
| TempShiftType | TempShiftTypeID | pears.TempShiftType (TempShiftTypeID) | |
| ComplianceDomain | ComplianceDomainID | pears.ComplianceDomain (ComplianceDomainID) | ON DELETE SET NULL |
Referenced By
| Table | Constraint | Columns | Referenced columns |
|---|---|---|---|
| pears.ETipLog | TempShiftTemplate | tempshiftplanid | TempShiftTemplateID |
| pears.MasterRosterShift | TempShiftTemplate | TempShiftTemplateID | TempShiftTemplateID |
| pears.PersonShiftPreference | TempShiftTemplate | TempShiftTemplateID | TempShiftTemplateID |
| pears.TemplateGroupTemplate | TempShiftTemplate | TempShiftTemplateID | TempShiftTemplateID |
| pears.TempShift | TempShiftTemplate | TempShiftTemplateID | TempShiftTemplateID |
| pears.TempShiftPlan | TempShiftTemplate | TempShiftTemplateID | TempShiftTemplateID |
| pears.TempShiftTemplateAllowed | TempShiftTemplate | TempShiftTemplateID | TempShiftTemplateID |
| pears.VacancyEtip | TempShiftTemplate | TempShiftTemplateID | TempShiftTemplateID |
Indexes
- No indexes found.
Triggers
- No triggers found.
Original SQL
-- IQX database structure split by table -- Source: IQXDatabaseStructure - with comments.sql -- Table: "pears"."TempShiftTemplate" -- Table comment: Definitions of Shift Templates - allowing quick creation of shifts with all necessary timing - grade - skill etc information. Templates remain linked to the created shift. -- Statement count: 14 CREATE TABLE "pears"."TempShiftTemplate" ( "TempShiftTemplateID" CHAR(20) NOT NULL ,"DepartmentID" CHAR(2) NULL ,"ClientTempShiftCode" CHAR(12) NULL ,"TagLocation" CHAR(1) NULL ,"TagID" CHAR(3) NULL ,"TagChoiceID" CHAR(4) NULL ,"EssentialSkillGradeID" CHAR(4) NULL ,"Description" CHAR(50) NOT NULL ,"TimeFrom" TIME NULL ,"TimeTo" TIME NULL ,"Moveable" SMALLINT NULL DEFAULT 0 ,"Minutes" SMALLINT NULL ,"BreakMinutes" SMALLINT NULL ,"ReferenceRequired" CHAR(1) NULL ,"ClientMustConfirm" SMALLINT NULL DEFAULT 0 ,"GradeTagID" CHAR(3) NULL ,"TempMustConfirm" SMALLINT NULL DEFAULT 0 ,"TempShiftTypeID" CHAR(2) NULL ,"AnalysisCode" CHAR(20) NULL ,"RecoveryHours" SMALLINT NULL DEFAULT 0 ,"ShiftOrderReasonRequired" SMALLINT NULL DEFAULT 0 ,"Defunct" SMALLINT NULL ,"SortOrder" SMALLINT NULL ,"ComplianceDomainID" CHAR(20) NULL ,PRIMARY KEY ("TempShiftTemplateID" ASC) ) GO COMMENT ON COLUMN "pears"."TempShiftTemplate"."ClientTempShiftCode" IS 'Allows standard shifts to be customised for clients or groups' GO COMMENT ON COLUMN "pears"."TempShiftTemplate"."TagLocation" IS 'Essential skill in P General Questionnaire A Departmental Questionnaire' GO COMMENT ON COLUMN "pears"."TempShiftTemplate"."TagID" IS 'For the essential skill' GO COMMENT ON COLUMN "pears"."TempShiftTemplate"."TagChoiceID" IS 'For the essential skill' GO COMMENT ON COLUMN "pears"."TempShiftTemplate"."EssentialSkillGradeID" IS 'Either grade choice from TagID or choice from GradeTagID' GO COMMENT ON COLUMN "pears"."TempShiftTemplate"."Minutes" IS 'Fill if shorter spell within the timespan' GO COMMENT ON COLUMN "pears"."TempShiftTemplate"."ReferenceRequired" IS 'on <E>ntry, <C>onfirmation, <T>imesheet entry. Blank for not required' GO COMMENT ON COLUMN "pears"."TempShiftTemplate"."GradeTagID" IS 'If essential skill is NOT graded list' GO COMMENT ON COLUMN "pears"."TempShiftTemplate"."ShiftOrderReasonRequired" IS 'Will prompt for order reason on new shifts' GO COMMENT ON TABLE "pears"."TempShiftTemplate" IS 'Definitions of Shift Templates - allowing quick creation of shifts with all necessary timing - grade - skill etc information. Templates remain linked to the created shift.' GO ALTER TABLE "pears"."TempShiftTemplate" ADD FOREIGN KEY "department" ("DepartmentID" ASC) REFERENCES "pears"."Department" ("departmentid") ON DELETE SET NULL GO ALTER TABLE "pears"."TempShiftTemplate" ADD FOREIGN KEY "TempShiftType" ("TempShiftTypeID" ASC) REFERENCES "pears"."TempShiftType" ("TempShiftTypeID") GO ALTER TABLE "pears"."TempShiftTemplate" ADD FOREIGN KEY "ComplianceDomain" ("ComplianceDomainID" ASC) REFERENCES "pears"."ComplianceDomain" ("ComplianceDomainID") ON DELETE SET NULL GO