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.TempShiftOrderReasonDepartment ====== <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 ===== Link between Departments and Shift Order Reasons. Reasons with no record are availabe to all Departments. ===== Columns ===== ^ Column ^ Type ^ Null ^ Default ^ Comment ^ | **TempShiftOrderReasonDepartmentID** | char(20) | NOT NULL | | | | TempShiftOrderReasonID | char(20) | NULL | | | | DepartmentID | char(2) | NULL | | | ===== Primary Key ===== * TempShiftOrderReasonDepartmentID ===== Foreign Keys ===== ^ Constraint ^ Columns ^ References ^ Delete/update action ^ | TempShiftOrderReason | TempShiftOrderReasonID | [[database:tables:pears_tempshiftorderreason|pears.TempShiftOrderReason (TempShiftOrderReasonID)]] | ON DELETE SET NULL | | department | DepartmentID | [[database:tables:pears_department|pears.Department (departmentid)]] | 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"."TempShiftOrderReasonDepartment" -- Table comment: Link between Departments and Shift Order Reasons. Reasons with no record are availabe to all Departments. -- Statement count: 4 CREATE TABLE "pears"."TempShiftOrderReasonDepartment" ( "TempShiftOrderReasonDepartmentID" char(20) NOT NULL ,"TempShiftOrderReasonID" char(20) NULL ,"DepartmentID" char(2) NULL ,PRIMARY KEY ("TempShiftOrderReasonDepartmentID" ASC) ) go COMMENT ON TABLE "pears"."TempShiftOrderReasonDepartment" IS 'Link between Departments and Shift Order Reasons. Reasons with no record are availabe to all Departments.' go ALTER TABLE "pears"."TempShiftOrderReasonDepartment" ADD FOREIGN KEY "TempShiftOrderReason" ("TempShiftOrderReasonID" ASC) REFERENCES "pears"."TempShiftOrderReason" ("TempShiftOrderReasonID") ON DELETE SET NULL go ALTER TABLE "pears"."TempShiftOrderReasonDepartment" ADD FOREIGN KEY "department" ("DepartmentID" ASC) REFERENCES "pears"."Department" ("departmentid") ON DELETE SET NULL go </code> database/tables/pears_tempshiftorderreasondepartment.txt Last modified: 2026/08/07 19:24by 127.0.0.1