Primary Key Field Type
 ID uniqueidentifier

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) CONVERT(bigint, TS) Numeric representation of the timestamp.
 DONORSTATECODE tinyint   Default = 7 0=New, 1=Recapture, 2=Upgrade, 3=Same, 4=Downgrade, 5=Lapsed new donor, 6=Lapsed repeat donor, 7=Lapsed multiple years, 8=Non-donor
 LASTREVENUEDATE date Date of the last revenue transaction made by the constituent.
 STARTDATE datetime  
 DONORSTATE nvarchar(21) (Computed) CASE [DONORSTATECODE] WHEN 0 THEN N'New' WHEN 1 THEN N'Recapture' WHEN 2 THEN N'Upgrade' WHEN 3 THEN N'Same' WHEN 4 THEN N'Downgrade' WHEN 5 THEN N'Lapsed new donor' WHEN 6 THEN N'Lapsed repeat donor' WHEN 7 THEN N'Lapsed multiple years' WHEN 8 THEN N'Non-donor' END Provides a translation for the 'DONORSTATECODE' field.
 FIRSTREVENUEDATE date Date of the last revenue transaction made by the constituent.

Foreign Key Field Type Null Notes Description
 CONSTITUENTID uniqueidentifier   CONSTITUENT.LOCALID FK to CONSTITUENT
 LIFECYCLETYPEID uniqueidentifier   LIFECYCLETYPE.ID FK to LIFECYCLETYPE
 ADDEDBYID uniqueidentifier   CHANGEAGENT.ID FK to CHANGEAGENT.
 CHANGEDBYID uniqueidentifier   CHANGEAGENT.ID FK to CHANGEAGENT.

Index Name Field(s) Unique Primary Clustered
 IX_REVENUELIFECYCLE_DATEADDED DATEADDED    
 IX_REVENUELIFECYCLE_DATECHANGED DATECHANGED      
 IX_REVENUELIFECYCLE_LIFECYCLETYPEID LIFECYCLETYPEID      
 PK_REVENUELIFECYCLE ID  
 UIX_REVENUELIFECYCLE_CONSTITUENTID_LIFECYCLETYPEID CONSTITUENTID, LIFECYCLETYPEID    

Trigger Name Description
 TR_REVENUELIFECYCLE_AUDIT_UPDATE
 TR_REVENUELIFECYCLE_AUDIT_DELETE
 TR_REVENUELIFECYCLE_UPDATE
 TR_REVENUELIFECYCLE_DELETE

Entity-Relationship diagram of this table