Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.
Record of deleted tag data. Purpose to save time recovering data if tag deleted by mistake. Cleared after 6 months
| Column | Type | Null | Default | Comment |
|---|---|---|---|---|
| DeletedID | integer | NOT NULL | autoincrement | |
| InstanceID | char(20) | NULL | Group all deletes together | |
| WhenDeleted | date | NULL | Used by cleanup and if multiple deletes | |
| DepartmentTagID | char(20) | NULL | ||
| TagID | char(3) | NULL | ||
| TagLocation | char(3) | NULL | ||
| DepartmentID | char(2) | NULL |
| Constraint | Columns | References | Delete/update action |
|---|---|---|---|
| Department | DepartmentID | pears.Department (departmentid) | ON DELETE CASCADE |
-- IQX database structure split by table -- Source: IQXDatabaseStructure - with comments.sql -- Table: "pears"."DeletedDepartmentTag" -- Table comment: Record of deleted tag data. Purpose to save time recovering data if tag deleted by mistake. Cleared after 6 months -- Statement count: 5 CREATE TABLE "pears"."DeletedDepartmentTag" ( "DeletedID" INTEGER NOT NULL DEFAULT autoincrement ,"InstanceID" CHAR(20) NULL ,"WhenDeleted" DATE NULL ,"DepartmentTagID" CHAR(20) NULL ,"TagID" CHAR(3) NULL ,"TagLocation" CHAR(3) NULL ,"DepartmentID" CHAR(2) NULL ,PRIMARY KEY ("DeletedID" ASC) ) GO COMMENT ON COLUMN "pears"."DeletedDepartmentTag"."InstanceID" IS 'Group all deletes together' GO COMMENT ON COLUMN "pears"."DeletedDepartmentTag"."WhenDeleted" IS 'Used by cleanup and if multiple deletes' GO COMMENT ON TABLE "pears"."DeletedDepartmentTag" IS 'Record of deleted tag data. Purpose to save time recovering data if tag deleted by mistake. Cleared after 6 months' GO ALTER TABLE "pears"."DeletedDepartmentTag" ADD FOREIGN KEY "Department" ("DepartmentID" ASC) REFERENCES "pears"."Department" ("departmentid") ON DELETE CASCADE GO