FAFORGANIZATIONINDIVIDUALRELATION

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
DATEADDED datetime Default = getdate()
DATECHANGED datetime Default = getdate()
TS timestamp
TSLONG bigint (Computed) yes CONVERT(bigint, TS)
TYPECODE tinyint Default = 0
TYPE nvarchar(12) (Computed) yes CASE [TYPECODE] WHEN 0 THEN N'Donation' WHEN 1 THEN N'Registration' WHEN 2 THEN N'Sponsor' END

Foreign Keys

Foreign Key Field Type Null Notes Description
REVENUEID uniqueidentifier yes FINANCIALTRANSACTION.ID
INDIVIDUALCONSTITUENTID uniqueidentifier CONSTITUENT.LOCALID
ORGANIZATIONCONSTITUENTID uniqueidentifier CONSTITUENT.LOCALID
EVENTID uniqueidentifier EVENT.ID
ADDEDBYID uniqueidentifier CHANGEAGENT.ID
CHANGEDBYID uniqueidentifier CHANGEAGENT.ID

Indexes

Index Name Fields Unique Primary Clustered
IX_FAFORGANIZATIONINDIVIDUALRELATION_DATEADDED DATEADDED yes
IX_FAFORGANIZATIONINDIVIDUALRELATION_DATECHANGED DATECHANGED
IX_FAFORGANIZATIONINDIVIDUALRELATION_REVENUEID_EVENTID_INDIVIDUALCONSTITUENTID_ORGANIZATIONCONSTITUENTID REVENUEID, EVENTID, INDIVIDUALCONSTITUENTID, ORGANIZATIONCONSTITUENTID
PK_FAFORGANIZATIONINDIVIDUALRELATION ID yes yes

Triggers

Trigger Name Description
TR_FAFORGANIZATIONINDIVIDUALRELATION_AUDIT_UPDATE
TR_FAFORGANIZATIONINDIVIDUALRELATION_AUDIT_DELETE