Show pageOld revisionsBacklinksExport to PDFFold/unfold allBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== pears.PlacementDayVariation ====== <WRAP center round info> Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace. </WRAP> ===== 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 ===== * PlacementID, VariationDate ===== Foreign Keys ===== ^ Constraint ^ Columns ^ References ^ Delete/update action ^ | placement | PlacementID | [[database:tables:pears_placement|pears.Placement (placementid)]] | NOT NULL; ON DELETE CASCADE | | TempShiftCancelReason | TempShiftCancelReasonID | [[database:tables:pears_tempshiftcancelreason|pears.TempShiftCancelReason (TempShiftCancelReasonID)]] | ON DELETE SET NULL | ===== Referenced By ===== * No incoming foreign keys found. ===== Indexes ===== * No indexes found. ===== Triggers ===== * No triggers found. ===== Original SQL ===== <code 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 </code> database/tables/pears_placementdayvariation.txt Last modified: 2026/08/07 19:24by 127.0.0.1