INTERACTIONATTACHMENT

This table contains attachments belonging to interactions.

Primary Key

Primary Key Field Type
ID uniqueidentifier

Fields

Field Field Type Null Notes Description
DATEENTERED datetime The date the attachment was entered.
TITLE nvarchar(100) Default = '' The title of the attachment.
FILENAME nvarchar(255) Default = '' The original file name for the attachment.
FILE varbinary The actual file for the attachment.
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
AUTHORID uniqueidentifier yes CONSTITUENT.LOCALID The author of the attachment.
INTERACTIONID uniqueidentifier INTERACTION.ID The constituent record to which this attachment belongs.
INTERACTIONATTACHMENTTYPECODEID uniqueidentifier yes INTERACTIONATTACHMENTTYPECODE.ID FK to INTERACTIONATTACHMENTTYPECODE
ENTEREDBYAPPUSERID uniqueidentifier yes APPUSER.ID FK to APPUSER
ADDEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.
CHANGEDBYID uniqueidentifier CHANGEAGENT.ID FK to CHANGEAGENT.

Indexes

Index Name Fields Unique Primary Clustered
IX_INTERACTIONATTACHMENT_AUTHORID AUTHORID
IX_INTERACTIONATTACHMENT_DATEADDED DATEADDED yes
IX_INTERACTIONATTACHMENT_DATECHANGED DATECHANGED
IX_INTERACTIONATTACHMENT_INTERACTIONID INTERACTIONID
PK_INTERACTIONATTACHMENT ID yes yes

Triggers

Trigger Name Description
TR_INTERACTIONATTACHMENT_AUDIT_UPDATE
TR_INTERACTIONATTACHMENT_AUDIT_DELETE