Commit 7511fd3e authored by Marius Burkard's avatar Marius Burkard

- change incremental sql to not drop existing data

parent 877e06a3
......@@ -96,44 +96,7 @@ ALTER TABLE `xmpp_domain`
-- STRIPDOWN!
ALTER TABLE `web_backup` CHANGE `backup_type` `backup_type` enum('web','mysql') NOT NULL DEFAULT 'web';
ALTER TABLE `web_database_user` DROP COLUMN `database_password_mongo`;
ALTER TABLE `client` CHANGE `web_php_options` `web_php_options` VARCHAR(255) NOT NULL DEFAULT 'no,fast-cgi,mod,php-fpm';
ALTER TABLE `client_template`
DROP COLUMN `default_xmppserver`,
DROP COLUMN `xmpp_servers`,
DROP COLUMN `limit_xmpp_domain`,
DROP COLUMN `limit_xmpp_user`,
DROP COLUMN `limit_xmpp_muc`,
DROP COLUMN `limit_xmpp_anon`,
DROP COLUMN `limit_xmpp_vjud`,
DROP COLUMN `limit_xmpp_proxy`,
DROP COLUMN `limit_xmpp_status`,
DROP COLUMN `limit_xmpp_pastebin`,
DROP COLUMN `limit_xmpp_httparchive`,
DROP COLUMN `limit_xmpp_webpresence`,
DROP COLUMN `limit_xmpp_http_upload`;
ALTER TABLE `server` DROP COLUMN `xmpp_server`;
ALTER TABLE `client`
DROP COLUMN `default_xmppserver` int(11) unsigned NOT NULL DEFAULT '1',
DROP COLUMN `xmpp_servers`,
DROP COLUMN `limit_xmpp_domain`,
DROP COLUMN `limit_xmpp_user`,
DROP COLUMN `limit_xmpp_muc`,
DROP COLUMN `limit_xmpp_anon`,
DROP COLUMN `limit_xmpp_auth_options`,
DROP COLUMN `limit_xmpp_vjud`,
DROP COLUMN `limit_xmpp_proxy`,
DROP COLUMN `limit_xmpp_status`,
DROP COLUMN `limit_xmpp_pastebin`,
DROP COLUMN `limit_xmpp_httparchive`,
DROP COLUMN `limit_xmpp_webpresence`,
DROP COLUMN `limit_xmpp_http_upload`;
DROP TABLE `xmpp_domain`;
DROP TABLE `xmpp_user`;
-- only on nginx
UPDATE `web_domain` as d INNER JOIN `server` as s ON (s.server_id = d.server_id) SET d.php = 'php-fpm' WHERE d.php = 'fast-cgi' AND s.config LIKE '%\nserver_type=nginx\n%' AND s.config NOT LIKE '%\nserver_type=apache\n%';
......@@ -142,6 +105,10 @@ UPDATE `web_domain` SET `php` = 'php-fpm' WHERE `php` = 'hhvm';
UPDATE `web_domain` SET `php` = 'fast-cgi' WHERE `php` = 'cgi';
UPDATE `web_domain` SET `php` = 'mod' WHERE `php` = 'suphp';
-- we do not drop columns or tables here to avoid deleting user data on existing servers!
-- END OF STRIPDOWN!
-- rspamd
ALTER TABLE `spamfilter_policy` ADD `rspamd_greylisting` ENUM('n','y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'n' AFTER `policyd_greylist`;
ALTER TABLE `spamfilter_policy` ADD `rspamd_spam_greylisting_level` DECIMAL(5,2) NULL DEFAULT NULL AFTER `rspamd_greylisting`;
......
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