DESIGNATIONCAMPAIGN

Defines campaigns to default on to revenue for designations.

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
DATEFROM date yes
DATETO date yes
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.
SEQUENCE int Default = 0

Foreign Keys

Foreign Key Field Type Null Notes Description
DESIGNATIONID uniqueidentifier DESIGNATION.ID FK to DESIGNATION
CAMPAIGNID uniqueidentifier CAMPAIGN.LOCALID FK to CAMPAIGN
CAMPAIGNSUBPRIORITYID uniqueidentifier yes CAMPAIGNSUBPRIORITY.ID FK to CAMPAIGNSUBPRIORITY
ADDEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
CHANGEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.

Indexes

Index Name Fields Unique Primary Clustered
IX_DESIGNATIONCAMPAIGN_DATEADDED DATEADDED yes
IX_DESIGNATIONCAMPAIGN_DATECHANGED DATECHANGED
IX_DESIGNATIONCAMPAIGN_DESIGNATIONID_CAMPAIGNID_CAMPAIGNSUBPRIORITYID DESIGNATIONID, CAMPAIGNID, CAMPAIGNSUBPRIORITYID
PK_DESIGNATIONCAMPAIGN ID yes yes

Triggers

Trigger Name Description
TR_DESIGNATIONCAMPAIGN_AUDIT_UPDATE
TR_DESIGNATIONCAMPAIGN_AUDIT_DELETE