====== pears.ETipLog ======
Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.
===== Description =====
Shift Import from Email (log)
===== Columns =====
^ Column ^ Type ^ Null ^ Default ^ Comment ^
| **LogID** | char(20) | NOT NULL | | |
| shiftdate | date | NULL | | |
| WhenCreated | timestamp | NULL | | |
| messageid | char(100) | NULL | | |
| tempshiftid | char(20) | NULL | | |
| jobcode | char(60) | NULL | | |
| locationcode | char(100) | NULL | | |
| shiftfrom | tinyint | NULL | | |
| shiftto | tinyint | NULL | | |
| tempshiftplanid | char(20) | NULL | | |
| etipid | char(20) | NULL | | |
===== Primary Key =====
* LogID
===== Foreign Keys =====
^ Constraint ^ Columns ^ References ^ Delete/update action ^
| TempShiftTemplate | tempshiftplanid | [[database:tables:pears_tempshifttemplate|pears.TempShiftTemplate (TempShiftTemplateID)]] | ON DELETE SET NULL |
| Etip | etipid | [[database:tables:pears_etip|pears.ETip (EtipID)]] | ON DELETE SET NULL |
===== Referenced By =====
* No incoming foreign keys found.
===== Indexes =====
^ Name ^ Type ^ Columns ^ Detail ^
| Etip | Unique index | jobcode, locationcode, shiftdate | |
===== Triggers =====
* No triggers found.
===== Original SQL =====
-- IQX database structure split by table
-- Source: IQXDatabaseStructure - with comments.sql
-- Table: "pears"."ETipLog"
-- Table comment: Shift Import from Email (log)
-- Statement count: 5
CREATE TABLE "pears"."ETipLog" (
"LogID" char(20) NOT NULL
,"shiftdate" date NULL
,"WhenCreated" timestamp NULL
,"messageid" char(100) NULL
,"tempshiftid" char(20) NULL
,"jobcode" char(60) NULL
,"locationcode" char(100) NULL
,"shiftfrom" tinyint NULL
,"shiftto" tinyint NULL
,"tempshiftplanid" char(20) NULL
,"etipid" char(20) NULL
,PRIMARY KEY ("LogID" ASC)
)
go
COMMENT ON TABLE "pears"."ETipLog" IS
'Shift Import from Email (log)'
go
ALTER TABLE "pears"."ETipLog"
ADD FOREIGN KEY "TempShiftTemplate" ("tempshiftplanid" ASC)
REFERENCES "pears"."TempShiftTemplate" ("TempShiftTemplateID")
ON DELETE SET NULL
go
ALTER TABLE "pears"."ETipLog"
ADD FOREIGN KEY "Etip" ("etipid" ASC)
REFERENCES "pears"."ETip" ("EtipID")
ON DELETE SET NULL
go
CREATE UNIQUE INDEX "Etip" ON "pears"."ETipLog"
( "jobcode","locationcode","shiftdate" )
go