WORKSTAGE

This holds work stage entries for each data element type.

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
DESCRIPTION nvarchar(30) Default = '' Work stage description
SEQUENCE int Default = 0 Sequence for user defined ordering of entries.
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.

Foreign Keys

Foreign Key Field Type Null Notes Description
ACCOUNTSTRUCTUREID uniqueidentifier PDACCOUNTSTRUCTURE.ID Refers to the accounting element this entry is used for.
ADDEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
CHANGEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.

Indexes

Index Name Fields Unique Primary Clustered
IX_WORKSTAGE_DATEADDED DATEADDED yes
IX_WORKSTAGE_DATECHANGED DATECHANGED
PK_WORKSTAGE ID yes yes
UIX_WORKSTAGE_ACCOUNTSTRUCTUREID_DESCRIPTION ACCOUNTSTRUCTUREID, DESCRIPTION yes

Triggers

Trigger Name Description
TR_WORKSTAGE_AUDIT_UPDATE
TR_WORKSTAGE_AUDIT_DELETE

Referenced by

Referenced by Field
USERDEFINEDELEMENT WORKSTAGEID