Table of Contents



pears.TempShiftTemplateAllowed

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

Description

Controls whether a particular Shift Template is allowed for an individual Vacancy. If no record for a given Vacancy all Shift Templates for the vacancy Department are allowed.

Columns

Column Type Null Default Comment
TempShiftTemplateID char(20) NOT NULL
VacancyID char(20) NOT NULL

Primary Key

Foreign Keys

Constraint Columns References Delete/update action
TempShiftTemplate TempShiftTemplateID pears.TempShiftTemplate (TempShiftTemplateID) NOT NULL; ON DELETE CASCADE
Vacancy VacancyID pears.vacancy (vacancyid) NOT NULL; ON DELETE CASCADE

Referenced By

Indexes

Triggers

Original SQL

-- IQX database structure split by table
-- Source: IQXDatabaseStructure - with comments.sql
-- Table: "pears"."TempShiftTemplateAllowed"
-- Table comment: Controls whether a particular Shift Template is allowed for an individual Vacancy. If no record for a given Vacancy all Shift Templates for the vacancy Department are allowed.
-- Statement count: 4
 
CREATE TABLE "pears"."TempShiftTemplateAllowed" (
    "TempShiftTemplateID"            CHAR(20) NOT NULL
   ,"VacancyID"                      CHAR(20) NOT NULL
   ,PRIMARY KEY ("TempShiftTemplateID" ASC,"VacancyID" ASC) 
)
GO
 
 
COMMENT ON TABLE "pears"."TempShiftTemplateAllowed" IS 
	'Controls whether a particular Shift Template is allowed for an individual Vacancy. If no record for a given Vacancy all Shift Templates for the vacancy Department are allowed.'
GO
 
 
ALTER TABLE "pears"."TempShiftTemplateAllowed"
    ADD NOT NULL FOREIGN KEY "TempShiftTemplate" ("TempShiftTemplateID" ASC)
    REFERENCES "pears"."TempShiftTemplate" ("TempShiftTemplateID")
    ON DELETE CASCADE
GO
 
 
ALTER TABLE "pears"."TempShiftTemplateAllowed"
    ADD NOT NULL FOREIGN KEY "Vacancy" ("VacancyID" ASC)
    REFERENCES "pears"."vacancy" ("vacancyid")
    ON DELETE CASCADE
GO