====== pears.MasterRosterFailLog ======
Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.
===== Description =====
Records of failure to create or fill shifts from a Master Roster.
===== Columns =====
^ Column ^ Type ^ Null ^ Default ^ Comment ^
| **MasterRosterFailLogID** | char(20) | NOT NULL | | |
| MasterRosterShiftID | char(20) | NOT NULL | | |
| PersonID | char(20) | NULL | | Filled if booking failure, empty if creation failure |
| ShiftDate | date | NOT NULL | | |
| Details | long varchar | NULL | | |
| WhenEntered | timestamp | NULL | current timestamp | |
===== Primary Key =====
* MasterRosterFailLogID
===== Foreign Keys =====
^ Constraint ^ Columns ^ References ^ Delete/update action ^
| MasterRosterShift | MasterRosterShiftID | [[database:tables:pears_masterrostershift|pears.MasterRosterShift (MasterRosterShiftID)]] | NOT NULL; ON DELETE CASCADE |
| person | PersonID | [[database:tables:pears_person|pears.Person (personid)]] | ON DELETE CASCADE |
===== Referenced By =====
* No incoming foreign keys found.
===== Indexes =====
* No indexes found.
===== Triggers =====
* No triggers found.
===== Original SQL =====
-- IQX database structure split by table
-- Source: IQXDatabaseStructure - with comments.sql
-- Table: "pears"."MasterRosterFailLog"
-- Table comment: Records of failure to create or fill shifts from a Master Roster.
-- Statement count: 5
CREATE TABLE "pears"."MasterRosterFailLog" (
"MasterRosterFailLogID" char(20) NOT NULL
,"MasterRosterShiftID" char(20) NOT NULL
,"PersonID" char(20) NULL
,"ShiftDate" date NOT NULL
,"Details" long varchar NULL
,"WhenEntered" timestamp NULL DEFAULT current timestamp
,PRIMARY KEY ("MasterRosterFailLogID" ASC)
)
go
COMMENT ON COLUMN "pears"."MasterRosterFailLog"."PersonID" IS
'Filled if booking failure, empty if creation failure'
go
COMMENT ON TABLE "pears"."MasterRosterFailLog" IS
'Records of failure to create or fill shifts from a Master Roster.'
go
ALTER TABLE "pears"."MasterRosterFailLog"
ADD NOT NULL FOREIGN KEY "MasterRosterShift" ("MasterRosterShiftID" ASC)
REFERENCES "pears"."MasterRosterShift" ("MasterRosterShiftID")
ON DELETE CASCADE
go
ALTER TABLE "pears"."MasterRosterFailLog"
ADD FOREIGN KEY "person" ("PersonID" ASC)
REFERENCES "pears"."Person" ("personid")
ON DELETE CASCADE
go