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.CardReaderShift ====== <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 ===== Shifts assembled from Time & Attendance data. ===== Columns ===== ^ Column ^ Type ^ Null ^ Default ^ Comment ^ | **CardReaderShiftID** | char(20) | NOT NULL | | | | MachineID | char(20) | NULL | | | | CardID | char(20) | NULL | | | | personid | char(20) | NULL | | | | clockintime | timestamp | NULL | | | | clockouttime | timestamp | NULL | | | | breakminutes | integer | NULL | | | | FailedToClockOutInTime | smallint | NULL | | | | ShiftStateWrong | char(1) | NULL | | | | WasExtended | smallint | NULL | 0 | | | NoShiftFound | smallint | NULL | 0 | | | WasLate | smallint | NULL | 0 | | | MatchedToShiftID | char(20) | NULL | | | ===== Primary Key ===== * CardReaderShiftID ===== Foreign Keys ===== ^ Constraint ^ Columns ^ References ^ Delete/update action ^ | CardReaderSettings | MachineID | [[database:tables:pears_cardreadersettings|pears.CardReaderSettings (MachineID)]] | | | tempshift | MatchedToShiftID | [[database:tables:pears_tempshift|pears.TempShift (TempShiftID)]] | ON DELETE SET NULL | ===== Referenced By ===== * No incoming foreign keys found. ===== Indexes ===== ^ Name ^ Type ^ Columns ^ Detail ^ | CardReaderShift_personid | Index | personid | | | CardReaderShift_cardid | Index | CardID | | ===== Triggers ===== * No triggers found. ===== Original SQL ===== <code sql> -- IQX database structure split by table -- Source: IQXDatabaseStructure - with comments.sql -- Table: "pears"."CardReaderShift" -- Table comment: Shifts assembled from Time & Attendance data. -- Statement count: 6 CREATE TABLE "pears"."CardReaderShift" ( "CardReaderShiftID" char(20) NOT NULL ,"MachineID" char(20) NULL ,"CardID" char(20) NULL ,"personid" char(20) NULL ,"clockintime" timestamp NULL ,"clockouttime" timestamp NULL ,"breakminutes" integer NULL ,"FailedToClockOutInTime" smallint NULL ,"ShiftStateWrong" char(1) NULL ,"WasExtended" smallint NULL DEFAULT 0 ,"NoShiftFound" smallint NULL DEFAULT 0 ,"WasLate" smallint NULL DEFAULT 0 ,"MatchedToShiftID" char(20) NULL ,PRIMARY KEY ("CardReaderShiftID" ASC) ) go COMMENT ON TABLE "pears"."CardReaderShift" IS 'Shifts assembled from Time & Attendance data.' go ALTER TABLE "pears"."CardReaderShift" ADD FOREIGN KEY "CardReaderSettings" ("MachineID" ASC) REFERENCES "pears"."CardReaderSettings" ("MachineID") go ALTER TABLE "pears"."CardReaderShift" ADD FOREIGN KEY "tempshift" ("MatchedToShiftID" ASC) REFERENCES "pears"."TempShift" ("TempShiftID") ON DELETE SET NULL go CREATE INDEX "CardReaderShift_personid" ON "pears"."CardReaderShift" ( "personid" ) go CREATE INDEX "CardReaderShift_cardid" ON "pears"."CardReaderShift" ( "CardID" ) go </code> database/tables/pears_cardreadershift.txt Last modified: 2026/08/07 19:24by 127.0.0.1