CRM-15970 - Add MailingAB fields, "created_id" and "created_date"
[civicrm-core.git] / CRM / Upgrade / Incremental / sql / 4.6.alpha7.mysql.tpl
1 {* file to handle db changes in 4.6.alpha7 during upgrade *}
2
3 -- location_type_id should have default NULL, not invalid id 0
4 ALTER TABLE civicrm_mailing CHANGE `location_type_id` `location_type_id` int(10) unsigned DEFAULT NULL COMMENT 'With email_selection_method, determines which email address to use';
5
6
7 -- CRM-15970 - Track authorship of of A/B tests
8 ALTER TABLE civicrm_mailing_abtest
9 ADD COLUMN `created_id` int unsigned COMMENT 'FK to Contact ID',
10 ADD COLUMN `created_date` datetime COMMENT 'When was this item created',
11 ADD CONSTRAINT FK_civicrm_mailing_abtest_created_id FOREIGN KEY (`created_id`) REFERENCES `civicrm_contact`(`id`) ON DELETE SET NULL;