CONSTITUENTORIGINATION

Holds addition information pertaining to all constituents

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
DATEADDED datetime Default = getdate() Indicates the date this record was added.
DATECHANGED datetime Default = getdate() Indicates the date this record was last changed.
TS timestamp Timestamp.
TSLONG bigint (Computed) yes CONVERT(bigint, TS) Numeric representation of the timestamp.
ORIGINCODE tinyint Default = 0 Defines where the address originated.
ORIGIN nvarchar(9) (Computed) yes CASE [ORIGINCODE] WHEN 0 THEN N'User' WHEN 1 THEN N'Web Forms' END Provides a translation for the 'ORIGINCODE' field.

Foreign Keys

Foreign Key Field Type Null Notes Description
ID uniqueidentifier CONSTITUENT.LOCALID Primary Key.
INFOSOURCECODEID uniqueidentifier yes INFOSOURCECODE.ID FK to INFOSOURCECODE
ADDEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
CHANGEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
REVENUEID uniqueidentifier yes FINANCIALTRANSACTION.ID FK to REVENUE

Indexes

Index Name Fields Unique Primary Clustered
IX_CONSTITUENTORIGINATION_DATEADDED DATEADDED yes
IX_CONSTITUENTORIGINATION_DATECHANGED DATECHANGED
IX_CONSTITUENTORIGINATION_ID ID
PK_CONSTITUENTORIGINATION ID yes yes
UIX_CONSTITUENTORIGINATION_REVENUEID REVENUEID yes

Triggers

Trigger Name Description
TR_CONSTITUENTORIGINATION_AUDIT_UPDATE
TR_CONSTITUENTORIGINATION_AUDIT_DELETE