pears.CardReaderShift
Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.
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 | pears.CardReaderSettings (MachineID) | |
| tempshift | MatchedToShiftID | 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
-- 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