====== pears.ContactEventSpeciality ======
Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.
===== Description =====
List of Divisions (?)
===== Columns =====
^ Column ^ Type ^ Null ^ Default ^ Comment ^
| **ContactEventSpecialityID** | char(20) | NOT NULL | | |
| Name | char(50) | NOT NULL | | |
| DivisionID | char(20) | NULL | | |
| SortOrder | smallint | NULL | | |
===== Primary Key =====
* ContactEventSpecialityID
===== Foreign Keys =====
^ Constraint ^ Columns ^ References ^ Delete/update action ^
| division | DivisionID | [[database:tables:pears_division|pears.Division (divisionid)]] | ON DELETE SET NULL |
===== Referenced By =====
* No incoming foreign keys found.
===== Indexes =====
^ Name ^ Type ^ Columns ^ Detail ^
| ContactEventSpeciality_sortorder | Index | DivisionID, SortOrder, Name | |
===== Triggers =====
* No triggers found.
===== Original SQL =====
-- IQX database structure split by table
-- Source: IQXDatabaseStructure - with comments.sql
-- Table: "pears"."ContactEventSpeciality"
-- Table comment: List of Divisions (?)
-- Statement count: 4
CREATE TABLE "pears"."ContactEventSpeciality" (
"ContactEventSpecialityID" char(20) NOT NULL
,"Name" char(50) NOT NULL
,"DivisionID" char(20) NULL
,"SortOrder" smallint NULL
,PRIMARY KEY ("ContactEventSpecialityID" ASC)
)
go
COMMENT ON TABLE "pears"."ContactEventSpeciality" IS
'List of Divisions (?)'
go
ALTER TABLE "pears"."ContactEventSpeciality"
ADD FOREIGN KEY "division" ("DivisionID" ASC)
REFERENCES "pears"."Division" ("divisionid")
ON DELETE SET NULL
go
CREATE INDEX "ContactEventSpeciality_sortorder" ON "pears"."ContactEventSpeciality"
( "DivisionID","SortOrder","Name" )
go