Correcting V322_1 migration script
This commit is contained in:
+31
-2
@@ -17,6 +17,35 @@
|
|||||||
-- under the License.
|
-- under the License.
|
||||||
--
|
--
|
||||||
|
|
||||||
|
CREATE TABLE `scheduled_email_campaign` (
|
||||||
|
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
|
||||||
|
`campaign_name` VARCHAR(100) NOT NULL,
|
||||||
|
`campaign_type` INT(11) NOT NULL,
|
||||||
|
`businessRule_id` INT(11) NOT NULL,
|
||||||
|
`param_value` TEXT NULL,
|
||||||
|
`status_enum` INT(11) NOT NULL,
|
||||||
|
`email_subject` VARCHAR(100) NOT NULL,
|
||||||
|
`email_message` TEXT NOT NULL,
|
||||||
|
`email_attachment_file_format` VARCHAR(10) NOT NULL,
|
||||||
|
`stretchy_report_id` INT(11) NOT NULL,
|
||||||
|
`stretchy_report_param_map` TEXT NULL DEFAULT NULL,
|
||||||
|
`closedon_date` DATE NULL DEFAULT NULL,
|
||||||
|
`closedon_userid` BIGINT(20) NULL DEFAULT NULL,
|
||||||
|
`submittedon_date` DATE NULL DEFAULT NULL,
|
||||||
|
`submittedon_userid` BIGINT(20) NULL DEFAULT NULL,
|
||||||
|
`approvedon_date` DATE NULL DEFAULT NULL,
|
||||||
|
`approvedon_userid` BIGINT(20) NULL DEFAULT NULL,
|
||||||
|
`recurrence` VARCHAR(100) NULL DEFAULT NULL,
|
||||||
|
`next_trigger_date` DATETIME NULL DEFAULT NULL,
|
||||||
|
`last_trigger_date` DATETIME NULL DEFAULT NULL,
|
||||||
|
`recurrence_start_date` DATETIME NULL DEFAULT NULL,
|
||||||
|
`is_visible` TINYINT(1) NULL DEFAULT '1',
|
||||||
|
`previous_run_error_log` TEXT NULL DEFAULT NULL,
|
||||||
|
`previous_run_error_message` TEXT NULL DEFAULT NULL,
|
||||||
|
PRIMARY KEY (`id`),
|
||||||
|
CONSTRAINT `scheduled_email_campaign_ibfk_1` FOREIGN KEY (`stretchy_report_id`) REFERENCES `stretchy_report` (`id`)
|
||||||
|
);
|
||||||
|
|
||||||
CREATE TABLE IF NOT EXISTS scheduled_email_messages_outbound (
|
CREATE TABLE IF NOT EXISTS scheduled_email_messages_outbound (
|
||||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||||
`group_id` bigint(20) DEFAULT NULL,
|
`group_id` bigint(20) DEFAULT NULL,
|
||||||
@@ -37,8 +66,8 @@ CREATE TABLE IF NOT EXISTS scheduled_email_messages_outbound (
|
|||||||
CONSTRAINT `SEFKGROUP000000001` FOREIGN KEY (`group_id`) REFERENCES `m_group` (`id`),
|
CONSTRAINT `SEFKGROUP000000001` FOREIGN KEY (`group_id`) REFERENCES `m_group` (`id`),
|
||||||
CONSTRAINT `SEFKCLIENT00000001` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`),
|
CONSTRAINT `SEFKCLIENT00000001` FOREIGN KEY (`client_id`) REFERENCES `m_client` (`id`),
|
||||||
CONSTRAINT `SEFKSTAFF000000001` FOREIGN KEY (`staff_id`) REFERENCES `m_staff` (`id`),
|
CONSTRAINT `SEFKSTAFF000000001` FOREIGN KEY (`staff_id`) REFERENCES `m_staff` (`id`),
|
||||||
CONSTRAINT `fk_schedule_email_campign` FOREIGN KEY (`email_campaign_id`) REFERENCES `scheduled_email_campaign` (`id`)
|
CONSTRAINT `fk_schedule_email_campign1` FOREIGN KEY (`email_campaign_id`) REFERENCES `scheduled_email_campaign` (`id`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
);
|
||||||
|
|
||||||
create table if not exists scheduled_email_configuration (
|
create table if not exists scheduled_email_configuration (
|
||||||
id int primary key auto_increment,
|
id int primary key auto_increment,
|
||||||
|
|||||||
Reference in New Issue
Block a user