Table of Contents



pears.ConsentType

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

Description

Master records for different types of Consent (GDPR)

Columns

Column Type Null Default Comment
ConsentTypeID char(20) NOT NULL
Name char(100) NOT NULL
DivisionID char(20) NULL
Notes long varchar NULL

Primary Key

Foreign Keys

Constraint Columns References Delete/update action
division DivisionID pears.Division (divisionid) ON DELETE SET NULL

Referenced By

Table Constraint Columns Referenced columns
pears.ConsentPersonOption ConsentType ConsentTypeID ConsentTypeID
pears.ConsentPersonOptionHistory ConsentType ConsentTypeID ConsentTypeID
pears.ConsentTypeOption ConsentType ConsentTypeID ConsentTypeID

Indexes

Triggers

Original SQL

-- IQX database structure split by table
-- Source: IQXDatabaseStructure - with comments.sql
-- Table: "pears"."ConsentType"
-- Table comment: Master records for different types of Consent (GDPR)
-- Statement count: 3
 
CREATE TABLE "pears"."ConsentType" (
    "ConsentTypeID"                  CHAR(20) NOT NULL
   ,"Name"                           CHAR(100) NOT NULL
   ,"DivisionID"                     CHAR(20) NULL
   ,"Notes"                          long VARCHAR NULL
   ,PRIMARY KEY ("ConsentTypeID" ASC) 
)
GO
 
 
COMMENT ON TABLE "pears"."ConsentType" IS 
	'Master records for different types of Consent (GDPR)'
GO
 
 
ALTER TABLE "pears"."ConsentType"
    ADD FOREIGN KEY "division" ("DivisionID" ASC)
    REFERENCES "pears"."Division" ("divisionid")
    ON DELETE SET NULL
GO