MEMBERSHIPLEVELRENEWALRULES

Stores historical data of membership level renewal rules.

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
BEFOREEXPIRATION tinyint Default = 0 The renewal window before the expiration date.
AFTEREXPIRATION tinyint Default = 0 The renewal window after the expiration date.
STARTDATE date yes The start date of this renewal rule.
ENDDATE date yes The end date of this renewal rule.
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.
NONRENEWALACTIONTYPECODE tinyint Default = 4
NONRENEWALACTIONTYPE nvarchar(7) (Computed) yes CASE [NONRENEWALACTIONTYPECODE] WHEN 4 THEN N'Lapsed' WHEN 5 THEN N'Expired' END

Foreign Keys

Foreign Key Field Type Null Notes Description
MEMBERSHIPLEVELID uniqueidentifier MEMBERSHIPLEVEL.ID The membership level for these terms.
ADDEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
CHANGEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
MEMBERSHIPLEVELRENEWAL1ID uniqueidentifier yes MEMBERSHIPLEVELRENEWAL.ID
MEMBERSHIPLEVELRENEWAL2ID uniqueidentifier yes MEMBERSHIPLEVELRENEWAL.ID
MEMBERSHIPLEVELRENEWAL3ID uniqueidentifier yes MEMBERSHIPLEVELRENEWAL.ID

Indexes

Index Name Fields Unique Primary Clustered
IX_MEMBERSHIPLEVELRENEWALRULES_DATEADDED DATEADDED yes
IX_MEMBERSHIPLEVELRENEWALRULES_DATECHANGED DATECHANGED
PK_MEMBERSHIPLEVELRENEWALRULES ID yes yes
UIX_MEMBERSHIPLEVELRENEWALRULES_MEMBERSHIPLEVELID_STARTDATE MEMBERSHIPLEVELID, STARTDATE yes

Triggers

Trigger Name Description
TR_MEMBERSHIPLEVELRENEWALRULES_AUDIT_UPDATE
TR_MEMBERSHIPLEVELRENEWALRULES_AUDIT_DELETE
TR_MEMBERSHIPLEVELRENEWALRULES_AUDIT_ETLDELETEDID