SPONSORSHIPTRANSACTION

Tracks information regarding a change to a sponsorship commitment.

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
TRANSACTIONSEQUENCE smallint Default = ((0)) For ordering the transactions for a commitment.
ACTIONCODE tinyint Default = 0 The action taken for this transaction.
TRANSACTIONDATE date yes The date on which this transaction occurred.
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.
ACTION nvarchar(24) (Computed) yes CASE [ACTIONCODE] WHEN 0 THEN N'Add' WHEN 1 THEN N'Transfer' WHEN 2 THEN N'Cancel' WHEN 3 THEN N'Terminate' WHEN 4 THEN N'Reactivate' WHEN 5 THEN N'Reassign' WHEN 6 THEN N'Initiate transfer' WHEN 7 THEN N'Override transfer' WHEN 8 THEN N'Complete transfer' WHEN 9 THEN N'Change financial sponsor' END Provides a translation for the 'ACTIONCODE' field.

Foreign Keys

Foreign Key Field Type Null Notes Description
SPONSORSHIPCOMMITMENTID uniqueidentifier SPONSORSHIPCOMMITMENT.ID The commitment for this transaction.
SPONSORSHIPREASONID uniqueidentifier yes SPONSORSHIPREASON.ID The reason for this transaction.
CONTEXTSPONSORSHIPID uniqueidentifier yes SPONSORSHIP.ID The sponsorship in whose context the action is being performed.
TARGETSPONSORSHIPID uniqueidentifier yes SPONSORSHIP.ID Sponsorship created or activated by the action.
DECLINEDSPONSORSHIPID uniqueidentifier yes SPONSORSHIP.ID Pending transfer that is being declined by an override or cancel.
ADDEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
CHANGEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
GIFTFINANCIALSPONSORID uniqueidentifier yes CONSTITUENT.LOCALID The financial sponsor on gift sponsorships.

Indexes

Index Name Fields Unique Primary Clustered
IX_SPONSORSHIPTRANSACTION_CONTEXTSPONSORSHIPID_TRANSACTIONSEQUENCE CONTEXTSPONSORSHIPID, TRANSACTIONSEQUENCE
IX_SPONSORSHIPTRANSACTION_DATEADDED DATEADDED yes
IX_SPONSORSHIPTRANSACTION_DATECHANGED DATECHANGED
IX_SPONSORSHIPTRANSACTION_GIFTFINANCIALSPONSORID GIFTFINANCIALSPONSORID
IX_SPONSORSHIPTRANSACTION_SPONSORSHIPREASONID SPONSORSHIPREASONID
IX_SPONSORSHIPTRANSACTION_TARGETSPONSORSHIPID_TRANSACTIONSEQUENCE TARGETSPONSORSHIPID, TRANSACTIONSEQUENCE
PK_SPONSORSHIPTRANSACTION ID yes yes
UIX_SPONSORSHIPTRANSACTION_DECLINEDSPONSORSHIPID DECLINEDSPONSORSHIPID yes
UIX_SPONSORSHIPTRANSACTION_SPONSORSHIPCOMMITMENTID_TRANSACTIONSEQUENCE SPONSORSHIPCOMMITMENTID, TRANSACTIONSEQUENCE yes

Triggers

Trigger Name Description
TR_SPONSORSHIPTRANSACTION_AUDIT_UPDATE
TR_SPONSORSHIPTRANSACTION_AUDIT_DELETE
TR_SPONSORSHIPTRANSACTION_AUDIT_ETLDELETEDID