Table of Contents



pears.PlacementDayVariation

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

Description

For Contract work hour variations

Columns

Column Type Null Default Comment
PlacementID char(20) NOT NULL
VariationDate date NOT NULL
WorkStartTime time NULL
WorkHours double NULL
WorkCancelled tinyint NULL
TempShiftCancelReasonID char(1) NULL

Primary Key

Foreign Keys

Constraint Columns References Delete/update action
placement PlacementID pears.Placement (placementid) NOT NULL; ON DELETE CASCADE
TempShiftCancelReason TempShiftCancelReasonID pears.TempShiftCancelReason (TempShiftCancelReasonID) ON DELETE SET NULL

Referenced By

Indexes

Triggers

Original SQL

-- IQX database structure split by table
-- Source: IQXDatabaseStructure - with comments.sql
-- Table: "pears"."PlacementDayVariation"
-- Table comment: For Contract work hour variations
-- Statement count: 4
 
CREATE TABLE "pears"."PlacementDayVariation" (
    "PlacementID"                    CHAR(20) NOT NULL
   ,"VariationDate"                  DATE NOT NULL
   ,"WorkStartTime"                  TIME NULL
   ,"WorkHours"                      DOUBLE NULL
   ,"WorkCancelled"                  tinyint NULL
   ,"TempShiftCancelReasonID"        CHAR(1) NULL
   ,PRIMARY KEY ("PlacementID" ASC,"VariationDate" ASC) 
)
GO
 
 
COMMENT ON TABLE "pears"."PlacementDayVariation" IS 
	'For Contract work hour variations'
GO
 
 
ALTER TABLE "pears"."PlacementDayVariation"
    ADD NOT NULL FOREIGN KEY "placement" ("PlacementID" ASC)
    REFERENCES "pears"."Placement" ("placementid")
    ON DELETE CASCADE
GO
 
 
ALTER TABLE "pears"."PlacementDayVariation"
    ADD FOREIGN KEY "TempShiftCancelReason" ("TempShiftCancelReasonID" ASC)
    REFERENCES "pears"."TempShiftCancelReason" ("TempShiftCancelReasonID")
    ON DELETE SET NULL
GO