Primary Key Field Type
 ID uniqueidentifier

Field Field Type Null Notes Description
 AUTHORCONSTITUENTID uniqueidentifier The constituent id of the comment author, if they are logged-in.
 AUTHORNAME nvarchar(100)   Default = '' Full name of the comment author. Most useful for comments by non-constituents.
 COMMENTTEXT nvarchar(1000)   Default = '' Full text of the posted comment
 REFERENCEID uniqueidentifier   GUID of the participant, image or video
 REFERENCETYPECODE tinyint   Default = 0 Commenttype that references a participant, image, or video
 REFERENCETYPE nvarchar(11) (Computed) CASE [REFERENCETYPECODE] WHEN 0 THEN N'Participant' WHEN 1 THEN N'Image' WHEN 2 THEN N'Video' END Provides a translation for the 'REFERENCETYPECODE' field.
 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.

Foreign Key Field Type Null Notes Description
 EVENTID uniqueidentifier   EVENT.ID The id of the event this comment was made in. Useful for archiving.
 ADDEDBYID uniqueidentifier   CHANGEAGENT.ID FK to CHANGEAGENT.
 CHANGEDBYID uniqueidentifier   CHANGEAGENT.ID FK to CHANGEAGENT.

Index Name Field(s) Unique Primary Clustered
 IX_COMMENT_TEXT_DATEADDED DATEADDED    
 IX_COMMENT_TEXT_DATECHANGED DATECHANGED      
 IX_COMMENT_TEXT_REFERENCEID REFERENCEID      
 PK_COMMENT_TEXT ID  

Trigger Name Description
 TR_COMMENT_TEXT_AUDIT_UPDATE
 TR_COMMENT_TEXT_AUDIT_DELETE

Entity-Relationship diagram of this table