From a1ed5a4ad6b92c2fa467e0fce188eaed73a03f1c Mon Sep 17 00:00:00 2001 From: Benjamin Sonntag Date: Wed, 4 Jul 2018 17:17:22 +0200 Subject: [PATCH] [fix] 3.4.10 and 3.4.11 where NOT executed during upgrades (sort -n :/ ) so we migrate those sql updates to 3.5.0.1.sql --- install/mysql.sql | 1 + install/upgrades/3.4.10.sql | 2 -- install/upgrades/3.4.11.sql | 2 -- install/upgrades/3.5.0.1.sql | 9 ++++++++- 4 files changed, 9 insertions(+), 5 deletions(-) delete mode 100644 install/upgrades/3.4.10.sql delete mode 100644 install/upgrades/3.4.11.sql diff --git a/install/mysql.sql b/install/mysql.sql index fc377c56..2e43504c 100644 --- a/install/mysql.sql +++ b/install/mysql.sql @@ -263,6 +263,7 @@ CREATE TABLE IF NOT EXISTS `mailbox` ( `bytes` bigint(20) NOT NULL DEFAULT '0', -- number of bytes in the mailbox, filled by dovecot `messages` int(11) NOT NULL DEFAULT '0', -- number of messages in the mailbox, filled by dovecot `lastlogin` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', -- Last login, filled by dovecot + `lastloginsasl` DATETIME NOT NULL DEFAULT 0, -- last login on SASL / SMTP, not filled yet ;) `mail_action` enum('OK','DELETE','DELETING') NOT NULL default 'OK', -- mail_action is DELETE or DELETING when deleting a mailbox by cron PRIMARY KEY (`id`), UNIQUE KEY `address_id` (`address_id`) diff --git a/install/upgrades/3.4.10.sql b/install/upgrades/3.4.10.sql deleted file mode 100644 index eb1bad9e..00000000 --- a/install/upgrades/3.4.10.sql +++ /dev/null @@ -1,2 +0,0 @@ - -ALTER TABLE mailbox MODIFY `lastlogin` DATETIME NOT NULL DEFAULT 0; diff --git a/install/upgrades/3.4.11.sql b/install/upgrades/3.4.11.sql deleted file mode 100644 index 643d3bc8..00000000 --- a/install/upgrades/3.4.11.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE `membres` MODIFY `pass` varchar(255); -ALTER TABLE `ftpusers` MODIFY `encrypted_password` varchar(255); diff --git a/install/upgrades/3.5.0.1.sql b/install/upgrades/3.5.0.1.sql index b53fbe8a..49fc7f44 100644 --- a/install/upgrades/3.5.0.1.sql +++ b/install/upgrades/3.5.0.1.sql @@ -1,3 +1,10 @@ +-- upgrade from 3.4.10 and 3.4.11 (a bug prevented them to be inserted :/ ) + +ALTER TABLE mailbox MODIFY `lastlogin` DATETIME NOT NULL DEFAULT 0; +ALTER TABLE mailbox ADD `lastloginsasl` DATETIME NOT NULL DEFAULT 0 AFTER `lastlogin`; + +ALTER TABLE `membres` MODIFY `pass` varchar(255); +ALTER TABLE `ftpusers` MODIFY `encrypted_password` varchar(255); -- upgrade to merge alternc-ssl into alternc + change the way we work on SSL @@ -9,7 +16,7 @@ ALTER TABLE `certificates` DROP `ssl_result`, ADD `provider` VARCHAR(16) NOT NULL DEFAULT '', ADD `created_at` DATETIME DEFAULT CURRENT_TIMESTAMP; - + ALTER TABLE `sub_domaines` ADD `certificate_id` INT UNSIGNED NOT NULL DEFAULT '0' AFTER `enable`, ADD `provider` VARCHAR(16) NOT NULL DEFAULT '' AFTER `certificate_id`,