Upgrade DB schema to 2.3

tags/0.2.28_el5 0.2.28_el5
Daniel Berteaud 10 years ago
parent 26b76251c9
commit 81fb652611
  1. 17
      root/etc/e-smith/templates/etc/e-smith/sql/init/sogo

@ -36,5 +36,22 @@ REPLACE INTO db (
FLUSH PRIVILEGES; FLUSH PRIVILEGES;
EOF 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 <<EOF
DELIMITER ;;
CREATE PROCEDURE upgrade_230()
BEGIN
DECLARE CONTINUE HANDLER FOR 1060 BEGIN END;
ALTER TABLE \$TABLE ADD COLUMN c_description mediumtext;
END;;
CALL upgrade_230();;
DROP PROCEDURE upgrade_230;
EOF
done
END END
} }

Loading…
Cancel
Save