FAFIMAGES
Table containing images/photos uploaded by the constituents/participants of a fundraising event.
Primary Key
Primary Key |
Field Type |
ID |
uniqueidentifier |
Fields
Field |
Field Type |
Null |
Notes |
Description |
NAME |
nvarchar(256) |
|
Default = '' |
Label/name of the image. |
DESCRIPTION |
nvarchar(256) |
|
Default = '' |
Description of the image. |
FILENAME |
nvarchar(256) |
|
Default = '' |
Name of file with extension |
UPLOADFILENAME |
nvarchar(256) |
|
Default = '' |
Path, filename and extension of the originally uploaded file. |
IMAGETYPE |
nvarchar(50) |
|
Default = '' |
Mime type of the image. |
IMAGESIZE |
int |
|
Default = 0 |
Number of bytes in the image. |
IMAGECONTENT |
varbinary |
yes |
|
The serialized image file. |
CAPTION |
nvarchar(256) |
|
Default = '' |
|
APPROVED |
bit |
|
Default = 0 |
Flag to be used for needed approval. |
PRIVATE |
bit |
|
Default = 0 |
Flag images only viewable by the participant. |
PHOTOGRAPHER |
nvarchar(256) |
|
Default = '' |
Image creator. |
PHOTODATETAKEN |
datetime |
yes |
|
Date the photo was taken. |
TAGS |
nvarchar(256) |
|
Default = '' |
Tags to assign photo, space separated. |
EXTERNALFLAG |
bit |
|
Default = 0 |
Flags photos housed at external sources. |
IMAGESOURCECODE |
tinyint |
|
Default = 0 |
Where the image was added from. |
IMAGESOURCE |
nvarchar(11) (Computed) |
yes |
CASE [IMAGESOURCECODE] WHEN 0 THEN N'FAF' WHEN 1 THEN N'Flickr' WHEN 2 THEN N'Photobucket' END |
Provides a translation for the 'IMAGESOURCECODE' field. |
EXTERNALURL |
nvarchar(256) |
|
Default = '' |
URL to image if the image is not contained in the IMAGECONTENT. |
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 |
CONSTITUENTID |
uniqueidentifier |
yes |
CONSTITUENT.LOCALID
|
The image owner constituent id |
EVENTID |
uniqueidentifier |
yes |
EVENT.ID
|
The event id related to this Image |
ADDEDBYID |
uniqueidentifier |
|
CHANGEAGENT.ID
|
FK to CHANGEAGENT. |
CHANGEDBYID |
uniqueidentifier |
|
CHANGEAGENT.ID
|
FK to CHANGEAGENT. |
Indexes
Index Name |
Fields |
Unique |
Primary |
Clustered |
IX_FAFIMAGES_CONSTITUENTID |
CONSTITUENTID |
|
|
|
IX_FAFIMAGES_DATEADDED |
DATEADDED |
|
|
yes |
IX_FAFIMAGES_DATECHANGED |
DATECHANGED |
|
|
|
PK_FAFIMAGES |
ID |
yes |
yes |
|
Triggers