Table of Contents



pears.ContactEventEmailLog

Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.

Description

Records when contact events are sent

Columns

Column Type Null Default Comment
ContactEventEmailLogID char(20) NOT NULL
ContactEventID char(20) NOT NULL
WhenSent timestamp NULL current timestamp
Recipients long varchar NULL
Attachments long varchar NULL
Direction char(3) NOT NULL 'OUT'
Method char(10) NOT NULL 'EMAIL'
NotificationTemplateID char(50) NULL
SubjectCount integer NOT NULL 0

Primary Key

Foreign Keys

Constraint Columns References Delete/update action
ContactEvent ContactEventID pears.contactevent (contacteventid) NOT NULL; ON DELETE CASCADE

Referenced By

Indexes

Triggers

Original SQL

-- IQX database structure split by table
-- Source: IQXDatabaseStructure - with comments.sql
-- Table: "pears"."ContactEventEmailLog"
-- Table comment: Records when contact events are sent
-- Statement count: 3
 
CREATE TABLE "pears"."ContactEventEmailLog" (
    "ContactEventEmailLogID"         CHAR(20) NOT NULL
   ,"ContactEventID"                 CHAR(20) NOT NULL
   ,"WhenSent"                       TIMESTAMP NULL DEFAULT CURRENT TIMESTAMP
   ,"Recipients"                     long VARCHAR NULL
   ,"Attachments"                    long VARCHAR NULL
   ,"Direction"                      CHAR(3) NOT NULL DEFAULT 'OUT'
   ,"Method"                         CHAR(10) NOT NULL DEFAULT 'EMAIL'
   ,"NotificationTemplateID"         CHAR(50) NULL
   ,"SubjectCount"                   INTEGER NOT NULL DEFAULT 0
   ,PRIMARY KEY ("ContactEventEmailLogID" ASC) 
)
GO
 
 
COMMENT ON TABLE "pears"."ContactEventEmailLog" IS 
	'Records when contact events are sent'
GO
 
 
ALTER TABLE "pears"."ContactEventEmailLog"
    ADD NOT NULL FOREIGN KEY "ContactEvent" ("ContactEventID" ASC)
    REFERENCES "pears"."contactevent" ("contacteventid")
    ON DELETE CASCADE
GO