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.CascadedShift ====== <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 ===== Details of when and to whom Shifts have been cascaded. Including errors. ===== Columns ===== ^ Column ^ Type ^ Null ^ Default ^ Comment ^ | **CascadedShiftID** | char(20) | NOT NULL | | | | TempshiftPlanID | char(20) | NOT NULL | | | | SecondaryAgencyID | char(20) | NOT NULL | | | | CascadeTime | timestamp | NOT NULL | | | | CascadeLevel | smallint | NOT NULL | | 1 is the first cascade | | Method | char(10) | NOT NULL | | | | Details | long varchar | NULL | | | | ErrorLevel | smallint | NULL | | | | ReNotifyState | char(20) | NULL | | | | WhenDeclined | timestamp | NULL | | | | DeclinedNote | long varchar | NULL | | | ===== Primary Key ===== * CascadedShiftID ===== Foreign Keys ===== ^ Constraint ^ Columns ^ References ^ Delete/update action ^ | TempShiftPlan | TempshiftPlanID | [[database:tables:pears_tempshiftplan|pears.TempShiftPlan (TempShiftPlanID)]] | NOT NULL; ON DELETE CASCADE | | Company | SecondaryAgencyID | [[database:tables:pears_company|pears.Company (companyid)]] | NOT NULL; ON DELETE CASCADE | ===== 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"."CascadedShift" -- Table comment: Details of when and to whom Shifts have been cascaded. Including errors. -- Statement count: 5 CREATE TABLE "pears"."CascadedShift" ( "CascadedShiftID" char(20) NOT NULL ,"TempshiftPlanID" char(20) NOT NULL ,"SecondaryAgencyID" char(20) NOT NULL ,"CascadeTime" timestamp NOT NULL ,"CascadeLevel" smallint NOT NULL ,"Method" char(10) NOT NULL ,"Details" long varchar NULL ,"ErrorLevel" smallint NULL ,"ReNotifyState" char(20) NULL ,"WhenDeclined" timestamp NULL ,"DeclinedNote" long varchar NULL ,PRIMARY KEY ("CascadedShiftID" ASC) ) go COMMENT ON COLUMN "pears"."CascadedShift"."CascadeLevel" IS '1 is the first cascade' go COMMENT ON TABLE "pears"."CascadedShift" IS 'Details of when and to whom Shifts have been cascaded. Including errors.' go ALTER TABLE "pears"."CascadedShift" ADD NOT NULL FOREIGN KEY "TempShiftPlan" ("TempshiftPlanID" ASC) REFERENCES "pears"."TempShiftPlan" ("TempShiftPlanID") ON DELETE CASCADE go ALTER TABLE "pears"."CascadedShift" ADD NOT NULL FOREIGN KEY "Company" ("SecondaryAgencyID" ASC) REFERENCES "pears"."Company" ("companyid") ON DELETE CASCADE go </code> database/tables/pears_cascadedshift.txt Last modified: 2026/08/07 19:24by 127.0.0.1