From 2a929928ab9090291e365760da40d4f1e2148c8e Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Tue, 2 Jun 2015 13:48:40 +0200 Subject: [PATCH] Upgrade DB schema to 2.3 --- root/etc/e-smith/templates/etc/e-smith/sql/init/sogo | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/root/etc/e-smith/templates/etc/e-smith/sql/init/sogo b/root/etc/e-smith/templates/etc/e-smith/sql/init/sogo index 06648a8..285930c 100644 --- a/root/etc/e-smith/templates/etc/e-smith/sql/init/sogo +++ b/root/etc/e-smith/templates/etc/e-smith/sql/init/sogo @@ -36,5 +36,22 @@ REPLACE INTO db ( FLUSH PRIVILEGES; EOF + +# Upgrade DB for 2.3.0 +for TABLE in \$(/usr/bin/mysql $db -s -e "select SUBSTRING_INDEX(c_quick_location, '/', -1) from sogo_folder_info where c_path3 = 'Calendar';"); do + /usr/bin/mysql $db -e "ALTER TABLE \$TABLE MODIFY c_partstates mediumtext;" + /usr/bin/mysql $db <