CODETABLESECURITY

Stores information pertaining to code table security.

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
TABLENAME nvarchar(100) Default = '' Table name of the record to check security against.
COLUMNNAME nvarchar(100) Default = '' Code table column name of the record to check security against.
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
RECORDTYPEID uniqueidentifier RECORDTYPE.ID Type of the record to check security against.
CODETABLECATALOGID uniqueidentifier CODETABLECATALOG.ID Code table ID.
ADDEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
CHANGEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.

Indexes

Index Name Fields Unique Primary Clustered
IX_CODETABLESECURITY_CODETABLECATALOGID CODETABLECATALOGID
IX_CODETABLESECURITY_DATEADDED DATEADDED yes
IX_CODETABLESECURITY_DATECHANGED DATECHANGED
IX_CODETABLESECURITY_RECORDTYPEID RECORDTYPEID
PK_CODETABLESECURITY ID yes yes
UIX_CODETABLESECURITY_TABLENAME_COLUMNNAME TABLENAME, COLUMNNAME yes

Triggers

Trigger Name Description
TR_CODETABLESECURITY_AUDIT_UPDATE
TR_CODETABLESECURITY_AUDIT_DELETE