Moving the upgrade processes before the database update since operations wanted to take place before the sql collumns and tables are actually up to date with the new version

This commit is contained in:
Steven Mondji-Lerider 2013-01-22 14:36:37 +00:00
parent ce1ca022b0
commit daf7e5b71f
2 changed files with 10 additions and 9 deletions

View File

@ -146,6 +146,15 @@ EOF
sed -e "$SED_SCRIPT" < $CONFIGFILE > $CONFIGFILE.tmp sed -e "$SED_SCRIPT" < $CONFIGFILE > $CONFIGFILE.tmp
mv -f $CONFIGFILE.tmp $CONFIGFILE mv -f $CONFIGFILE.tmp $CONFIGFILE
# Erase all apacheconf file
# They will be regenerated without the bug by upgrade_check.sh below.
if dpkg --compare-versions "$2" le "0.9.3.9-globenet14"; then
rm -f /var/alternc/apacheconf/*/*
fi
echo "checking for upgrades"
/usr/share/alternc/install/upgrade_check.sh $2
# Setup grants # Setup grants
db_get "alternc/mysql/host" db_get "alternc/mysql/host"
MYSQL_HOST="$RET" MYSQL_HOST="$RET"
@ -205,14 +214,6 @@ EOF
FQDN_LETTER="_" FQDN_LETTER="_"
fi fi
# Erase all apacheconf file
# They will be regenerated without the bug by upgrade_check.sh below.
if dpkg --compare-versions "$2" le "0.9.3.9-globenet14"; then
rm -f /var/alternc/apacheconf/*/*
fi
echo "checking for upgrades"
/usr/share/alternc/install/upgrade_check.sh $2
echo "config phpmyadmin" echo "config phpmyadmin"
# Mise à jour sur une configuration existante # Mise à jour sur une configuration existante

View File

@ -121,7 +121,7 @@ CREATE TABLE IF NOT EXISTS `mailbox` (
-- --
-- Other recipients for an address (aliases) -- Other recipients for an address (aliases)
CREATE TABLE `recipient` ( CREATE TABLE IF NOT EXISTS `recipient` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, -- Technical id. `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, -- Technical id.
`address_id` bigint(20) unsigned NOT NULL REFERENCES `address`(`id`), -- Reference to address `address_id` bigint(20) unsigned NOT NULL REFERENCES `address`(`id`), -- Reference to address
`recipients` text NOT NULL, -- Recipients `recipients` text NOT NULL, -- Recipients