COMMENT_TEXT

Table containing FAF user comments, made on participants or media

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
AUTHORCONSTITUENTID uniqueidentifier yes 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) yes 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) yes CONVERT(bigint, TS) Numeric representation of the timestamp.

Foreign Keys

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.

Indexes

Index Name Fields Unique Primary Clustered
IX_COMMENT_TEXT_DATEADDED DATEADDED yes
IX_COMMENT_TEXT_DATECHANGED DATECHANGED
IX_COMMENT_TEXT_REFERENCEID REFERENCEID
PK_COMMENT_TEXT ID yes yes

Triggers

Trigger Name Description
TR_COMMENT_TEXT_AUDIT_UPDATE
TR_COMMENT_TEXT_AUDIT_DELETE