Index: branches/5.1.x/core/install/install_schema.sql =================================================================== diff -u -N -r13188 -r13390 --- branches/5.1.x/core/install/install_schema.sql (.../install_schema.sql) (revision 13188) +++ branches/5.1.x/core/install/install_schema.sql (.../install_schema.sql) (revision 13390) @@ -1064,28 +1064,102 @@ DisplayInGrid tinyint(1) NOT NULL DEFAULT '1', DefaultValue text, Validation tinyint(4) NOT NULL DEFAULT '0', + Visibility tinyint(4) NOT NULL DEFAULT '1', + EmailCommunicationRole tinyint(4) NOT NULL DEFAULT '0', PRIMARY KEY (FormFieldId), KEY `Type` (`Type`), KEY FormId (FormId), KEY Priority (Priority), KEY IsSystem (IsSystem), - KEY DisplayInGrid (DisplayInGrid) + KEY DisplayInGrid (DisplayInGrid), + KEY Visibility (Visibility), + KEY EmailCommunicationRole (EmailCommunicationRole) ); CREATE TABLE FormSubmissions ( FormSubmissionId int(11) NOT NULL AUTO_INCREMENT, FormId int(11) NOT NULL DEFAULT '0', SubmissionTime int(11) DEFAULT NULL, + IPAddress varchar(15) NOT NULL DEFAULT '', + ReferrerURL varchar(255) NOT NULL DEFAULT '', + LogStatus tinyint(3) unsigned NOT NULL DEFAULT '2', + LastUpdatedOn int(10) unsigned DEFAULT NULL, + Notes text, PRIMARY KEY (FormSubmissionId), KEY FormId (FormId), - KEY SubmissionTime (SubmissionTime) + KEY SubmissionTime (SubmissionTime), + KEY LogStatus (LogStatus), + KEY LastUpdatedOn (LastUpdatedOn) ); +CREATE TABLE SubmissionLog ( + SubmissionLogId int(11) NOT NULL AUTO_INCREMENT, + FormSubmissionId int(10) unsigned NOT NULL, + FromEmail varchar(255) NOT NULL DEFAULT '', + ToEmail varchar(255) NOT NULL DEFAULT '', + Cc text, + Bcc text, + `Subject` varchar(255) NOT NULL DEFAULT '', + Message text, + Attachment text, + ReplyStatus tinyint(3) unsigned NOT NULL DEFAULT '0', + SentStatus tinyint(3) unsigned NOT NULL DEFAULT '0', + SentOn int(10) unsigned DEFAULT NULL, + RepliedOn int(10) unsigned DEFAULT NULL, + VerifyCode varchar(32) NOT NULL DEFAULT '', + DraftId int(10) unsigned NOT NULL DEFAULT '0', + MessageId varchar(255) NOT NULL DEFAULT '', + BounceInfo text, + BounceDate int(11) DEFAULT NULL, + PRIMARY KEY (SubmissionLogId), + KEY FormSubmissionId (FormSubmissionId), + KEY ReplyStatus (ReplyStatus), + KEY SentStatus (SentStatus), + KEY SentOn (SentOn), + KEY RepliedOn (RepliedOn), + KEY VerifyCode (VerifyCode), + KEY DraftId (DraftId), + KEY BounceDate (BounceDate), + KEY MessageId (MessageId) +); + +CREATE TABLE Drafts ( + DraftId int(11) NOT NULL AUTO_INCREMENT, + FormSubmissionId int(10) unsigned NOT NULL DEFAULT '0', + CreatedOn int(10) unsigned DEFAULT NULL, + CreatedById int(11) NOT NULL, + Message text, + PRIMARY KEY (DraftId), + KEY FormSubmissionId (FormSubmissionId), + KEY CreatedOn (CreatedOn), + KEY CreatedById (CreatedById) +); + CREATE TABLE Forms ( - FormId int(11) NOT NULL auto_increment, - Title VARCHAR(255) NOT NULL DEFAULT '', + FormId int(11) NOT NULL AUTO_INCREMENT, + Title varchar(255) NOT NULL DEFAULT '', Description text, - PRIMARY KEY (FormId) + RequireLogin tinyint(4) NOT NULL DEFAULT '0', + UseSecurityImage tinyint(4) NOT NULL DEFAULT '0', + EnableEmailCommunication tinyint(4) NOT NULL DEFAULT '0', + ReplyFromName varchar(255) NOT NULL DEFAULT '', + ReplyFromEmail varchar(255) NOT NULL DEFAULT '', + ReplyCc varchar(255) NOT NULL DEFAULT '', + ReplyBcc varchar(255) NOT NULL DEFAULT '', + ReplyMessageSignature text, + ReplyServer varchar(255) NOT NULL DEFAULT '', + ReplyPort int(11) NOT NULL DEFAULT '110', + ReplyUsername varchar(255) NOT NULL DEFAULT '', + ReplyPassword varchar(255) NOT NULL DEFAULT '', + BounceEmail varchar(255) NOT NULL DEFAULT '', + BounceServer varchar(255) NOT NULL DEFAULT '', + BouncePort int(11) NOT NULL DEFAULT '110', + BounceUsername varchar(255) NOT NULL DEFAULT '', + BouncePassword varchar(255) NOT NULL DEFAULT '', + PRIMARY KEY (FormId), + KEY UseSecurityImage (UseSecurityImage), + KEY RequireLogin (RequireLogin), + KEY EnableEmailCommunication (EnableEmailCommunication) ); CREATE TABLE Semaphores (