22 lines
668 B
Bash
22 lines
668 B
Bash
#! /bin/sh
|
|
|
|
# This script updates c_partstates to mediumtext
|
|
# adds c_description to Calendar quick tables
|
|
# http://www.sogo.nu/bugs/view.php?id=3175
|
|
# the field length was actually changed in v2.2.18
|
|
|
|
for TABLE in $(/usr/bin/mysql sogo -s -e "select SUBSTRING_INDEX(c_quick_location, '/', -1) from sogo_folder_info where c_path3 = 'Calendar';"); do
|
|
/usr/bin/mysql sogo -e "ALTER TABLE $TABLE MODIFY c_partstates mediumtext;"
|
|
/usr/bin/mysql sogo <<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
|