====== pears.CardReaderImport ====== Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace. ===== Description ===== Import table for Time & Attendance data (eg card swipes etc). ===== Columns ===== ^ Column ^ Type ^ Null ^ Default ^ Comment ^ | **ID** | char(20) | NOT NULL | | | | BearBoxID | integer | NULL | | | | MachineID | char(20) | NULL | | | | CardID | char(20) | NULL | | | | location | char(100) | NULL | | | | thetime | timestamp | NULL | | | | whenentered | timestamp | NULL | | | | processed | smallint | NULL | | | | personid | char(20) | NULL | | | | cardholder | char(100) | NULL | | | | clockin | smallint | NULL | | | | event | char(20) | NULL | | | | misread | smallint | NULL | | | ===== Primary Key ===== * ID ===== Foreign Keys ===== ^ Constraint ^ Columns ^ References ^ Delete/update action ^ | CardReaderSettings | MachineID | [[database:tables:pears_cardreadersettings|pears.CardReaderSettings (MachineID)]] | | ===== Referenced By ===== * No incoming foreign keys found. ===== Indexes ===== ^ Name ^ Type ^ Columns ^ Detail ^ | CardReaderImport_personid | Index | personid | | | CardReaderImport_cardid | Index | CardID | | ===== Triggers ===== * No triggers found. ===== Original SQL ===== -- IQX database structure split by table -- Source: IQXDatabaseStructure - with comments.sql -- Table: "pears"."CardReaderImport" -- Table comment: Import table for Time & Attendance data (eg card swipes etc). -- Statement count: 5 CREATE TABLE "pears"."CardReaderImport" ( "ID" char(20) NOT NULL ,"BearBoxID" integer NULL ,"MachineID" char(20) NULL ,"CardID" char(20) NULL ,"location" char(100) NULL ,"thetime" timestamp NULL ,"whenentered" timestamp NULL ,"processed" smallint NULL ,"personid" char(20) NULL ,"cardholder" char(100) NULL ,"clockin" smallint NULL ,"event" char(20) NULL ,"misread" smallint NULL ,PRIMARY KEY ("ID" ASC) ) go COMMENT ON TABLE "pears"."CardReaderImport" IS 'Import table for Time & Attendance data (eg card swipes etc).' go ALTER TABLE "pears"."CardReaderImport" ADD FOREIGN KEY "CardReaderSettings" ("MachineID" ASC) REFERENCES "pears"."CardReaderSettings" ("MachineID") go CREATE INDEX "CardReaderImport_personid" ON "pears"."CardReaderImport" ( "personid" ) go CREATE INDEX "CardReaderImport_cardid" ON "pears"."CardReaderImport" ( "CardID" ) go