pears.DeletedReferenceMasterQuestion

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
InstanceID2 char(20) NULL Group all deletes together
WhenDeleted date NULL Used by cleanup and if multiple deletes
ReferenceMasterQuestionID char(20) NULL
ReferenceMasterID char(20) NOT NULL
taglocation char(3) NULL
instanceid char(20) NULL
tagid char(3) NOT NULL
sortorder smallint NULL
  • DeletedID
Constraint Columns References Delete/update action
ReferenceMaster ReferenceMasterID pears.ReferenceMaster (ReferenceMasterID) NOT NULL; ON DELETE CASCADE
  • No incoming foreign keys found.
  • No indexes found.
  • No triggers found.
-- IQX database structure split by table
-- Source: IQXDatabaseStructure - with comments.sql
-- Table: "pears"."DeletedReferenceMasterQuestion"
-- 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"."DeletedReferenceMasterQuestion" (
    "DeletedID"                      INTEGER NOT NULL DEFAULT autoincrement
   ,"InstanceID2"                    CHAR(20) NULL
   ,"WhenDeleted"                    DATE NULL
   ,"ReferenceMasterQuestionID"      CHAR(20) NULL
   ,"ReferenceMasterID"              CHAR(20) NOT NULL
   ,"taglocation"                    CHAR(3) NULL
   ,"instanceid"                     CHAR(20) NULL
   ,"tagid"                          CHAR(3) NOT NULL
   ,"sortorder"                      SMALLINT NULL
   ,PRIMARY KEY ("DeletedID" ASC) 
)
GO
 
 
COMMENT ON COLUMN "pears"."DeletedReferenceMasterQuestion"."InstanceID2" IS 
	'Group all deletes together'
GO
 
 
COMMENT ON COLUMN "pears"."DeletedReferenceMasterQuestion"."WhenDeleted" IS 
	'Used by cleanup and if multiple deletes'
GO
 
 
COMMENT ON TABLE "pears"."DeletedReferenceMasterQuestion" 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"."DeletedReferenceMasterQuestion"
    ADD NOT NULL FOREIGN KEY "ReferenceMaster" ("ReferenceMasterID" ASC)
    REFERENCES "pears"."ReferenceMaster" ("ReferenceMasterID")
    ON DELETE CASCADE
GO
  • database/tables/pears_deletedreferencemasterquestion.txt
  • Last modified: 2026/08/07 19:24
  • by 127.0.0.1