Commit 3078b0bf authored by Jamie McClelland's avatar Jamie McClelland

ensure out db records get cleaned up with a survey is deleted.

parent 42d2dc5b
......@@ -5,4 +5,4 @@ ALTER TABLE civicrm_petition_email DROP COLUMN `recipient_email`;
ALTER TABLE civicrm_petition_email DROP COLUMN `recipient_name`;
ALTER TABLE civicrm_petition_email CHANGE COLUMN message_field message_field varchar(128);
ALTER TABLE civicrm_petition_email ADD COLUMN `location_type_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'The location type that should be used when selecting the target email address.' AFTER group_id;
ALTER TABLE civicrm_petition_email ADD CONSTRAINT `FK_civicrm_petition_email_petition_id` FOREIGN KEY (`petition_id`) REFERENCES `civicrm_survey` (`id`) ON DELETE CASCADE;
......@@ -10,7 +10,8 @@ CREATE TABLE IF NOT EXISTS `civicrm_petition_email` (
`subject` varchar(128) DEFAULT NULL COMMENT 'The subject line for outgoing emails.',
`recipients` text COMMENT 'The name and email address of additional targets that should receive a copy of all petitions signed, separated by line breaks.',
PRIMARY KEY (`petition_id`),
KEY `petition_id` (`petition_id`)
KEY `petition_id` (`petition_id`),
CONSTRAINT `FK_civicrm_petition_email_petition_id` FOREIGN KEY (`petition_id`) REFERENCES `civicrm_survey` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Stores recipient and message information for petitions.';
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment