24 lines
1.4 KiB
SQL
24 lines
1.4 KiB
SQL
# Header section
|
|
# Define incrementing schema version number
|
|
SET @schema_version = '28';
|
|
|
|
# Add unsubscription mode field to lists
|
|
ALTER TABLE `lists` ADD COLUMN `unsubscription_mode` int(11) unsigned DEFAULT 0 NOT NULL AFTER `public_subscribe`;
|
|
|
|
# Change the name of the column to better reflect that confirmations are also used for unsubscription and email address update
|
|
ALTER TABLE `confirmations` CHANGE `opt_in_ip` `ip` varchar(100) DEFAULT NULL;
|
|
|
|
# Rename affected forms in custom_forms_data
|
|
update custom_forms_data set data_key="mail_confirm_subscription_html" where data_key="mail_confirm_html";
|
|
update custom_forms_data set data_key="mail_confirm_subscription_text" where data_key="mail_confirm_text";
|
|
update custom_forms_data set data_key="mail_unsubscription_confirmed_html" where data_key="mail_unsubscribe_confirmed_html";
|
|
update custom_forms_data set data_key="mail_unsubscription_confirmed_text" where data_key="mail_unsubscribe_confirmed_text";
|
|
update custom_forms_data set data_key="web_confirm_subscription_notice" where data_key="web_confirm_notice";
|
|
update custom_forms_data set data_key="web_subscribed_notice" where data_key="web_subscribed";
|
|
update custom_forms_data set data_key="web_unsubscribed_notice" where data_key="web_unsubscribe_notice";
|
|
|
|
|
|
# Footer section
|
|
LOCK TABLES `settings` WRITE;
|
|
INSERT INTO `settings` (`key`, `value`) VALUES('db_schema_version', @schema_version) ON DUPLICATE KEY UPDATE `value`=@schema_version;
|
|
UNLOCK TABLES;
|