pears.ConsentPersonOptionHistory

Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.

History of changes to person consent (GDPR etc) settings

Column Type Null Default Comment
ConsentPersonOptionHistoryID char(20) NOT NULL
ConsentTypeID char(20) NULL
ConsentTypeOptionID char(20) NULL
PersonID char(20) NULL
WhoEntered char(20) NULL
WithdrawDate date NULL
EventDateTime timestamp NULL current timestamp
ConnectionNumber integer NULL
  • ConsentPersonOptionHistoryID
Constraint Columns References Delete/update action
ConsentType ConsentTypeID pears.ConsentType (ConsentTypeID)
ConsentTypeOption ConsentTypeOptionID pears.ConsentTypeOption (ConsentTypeOptionID)
Person PersonID pears.Person (personid) 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"."ConsentPersonOptionHistory"
-- Table comment: History of changes to person consent (GDPR etc) settings 
-- Statement count: 5
 
CREATE TABLE "pears"."ConsentPersonOptionHistory" (
    "ConsentPersonOptionHistoryID"   CHAR(20) NOT NULL
   ,"ConsentTypeID"                  CHAR(20) NULL
   ,"ConsentTypeOptionID"            CHAR(20) NULL
   ,"PersonID"                       CHAR(20) NULL
   ,"WhoEntered"                     CHAR(20) NULL
   ,"WithdrawDate"                   DATE NULL
   ,"EventDateTime"                  TIMESTAMP NULL DEFAULT CURRENT TIMESTAMP
   ,"ConnectionNumber"               INTEGER NULL
   ,PRIMARY KEY ("ConsentPersonOptionHistoryID" ASC) 
)
GO
 
 
COMMENT ON TABLE "pears"."ConsentPersonOptionHistory" IS 
	'History of changes to person consent (GDPR etc) settings '
GO
 
 
ALTER TABLE "pears"."ConsentPersonOptionHistory"
    ADD FOREIGN KEY "ConsentType" ("ConsentTypeID" ASC)
    REFERENCES "pears"."ConsentType" ("ConsentTypeID")
GO
 
 
ALTER TABLE "pears"."ConsentPersonOptionHistory"
    ADD FOREIGN KEY "ConsentTypeOption" ("ConsentTypeOptionID" ASC)
    REFERENCES "pears"."ConsentTypeOption" ("ConsentTypeOptionID")
GO
 
 
ALTER TABLE "pears"."ConsentPersonOptionHistory"
    ADD FOREIGN KEY "Person" ("PersonID" ASC)
    REFERENCES "pears"."Person" ("personid")
    ON DELETE CASCADE
GO
  • database/tables/pears_consentpersonoptionhistory.txt
  • Last modified: 2026/08/07 19:24
  • by 127.0.0.1