pears.CardReaderCard
Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.
Description
Current state (in or out) for each swipe card or equivalent.
Columns
| Column | Type | Null | Default | Comment |
|---|---|---|---|---|
| CardReaderCardID | char(20) | NOT NULL | ||
| MachineID | char(20) | NULL | ||
| CardID | char(20) | NULL | ||
| inorout | smallint | NULL |
Primary Key
- CardReaderCardID
Foreign Keys
| Constraint | Columns | References | Delete/update action |
|---|---|---|---|
| CardReaderSettings | MachineID | pears.CardReaderSettings (MachineID) |
Referenced By
- No incoming foreign keys found.
Indexes
| Name | Type | Columns | Detail |
|---|---|---|---|
| CardReaderCard_cardid | Index | CardID |
Triggers
- No triggers found.
Original SQL
-- IQX database structure split by table -- Source: IQXDatabaseStructure - with comments.sql -- Table: "pears"."CardReaderCard" -- Table comment: Current state (in or out) for each swipe card or equivalent. -- Statement count: 4 CREATE TABLE "pears"."CardReaderCard" ( "CardReaderCardID" CHAR(20) NOT NULL ,"MachineID" CHAR(20) NULL ,"CardID" CHAR(20) NULL ,"inorout" SMALLINT NULL ,PRIMARY KEY ("CardReaderCardID" ASC) ) GO COMMENT ON TABLE "pears"."CardReaderCard" IS 'Current state (in or out) for each swipe card or equivalent.' GO ALTER TABLE "pears"."CardReaderCard" ADD FOREIGN KEY "CardReaderSettings" ("MachineID" ASC) REFERENCES "pears"."CardReaderSettings" ("MachineID") GO CREATE INDEX "CardReaderCard_cardid" ON "pears"."CardReaderCard" ( "CardID" ) GO