From 1c8d6e63e61f69cc79ab5dcb6bf256e030360c83 Mon Sep 17 00:00:00 2001 From: David Goodwin Date: Wed, 7 Jan 2009 19:59:33 +0000 Subject: [PATCH] upgrade.php: this makes it work for me... git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@509 a1433add-5e2c-0410-b055-b7f2511e0802 --- upgrade.php | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/upgrade.php b/upgrade.php index 2bcc570d..f8115d01 100644 --- a/upgrade.php +++ b/upgrade.php @@ -766,7 +766,7 @@ function upgrade_318_mysql() { CONSTRAINT `vacation_notification_pkey` FOREIGN KEY (`on_vacation`) REFERENCES $table_vacation(`email`) ON DELETE CASCADE ) - ENGINE=InnoDB DEFAULT {LATIN1} TYPE=InnoDB + ENGINE=InnoDB TYPE=InnoDB COMMENT='Postfix Admin - Virtual Vacation Notifications' "); @@ -774,7 +774,7 @@ function upgrade_318_mysql() { $all_sql = split("\n", trim(" ALTER TABLE `$table_vacation_notification` CHANGE `on_vacation` `on_vacation` VARCHAR( 255 ) NOT NULL ALTER TABLE `$table_vacation_notification` CHANGE `notified` `notified` VARCHAR( 255 ) NOT NULL - ALTER TABLE `$table_vacation_notification` DEFAULT {LATIN1} + ALTER TABLE `$table_vacation_notification` DEFAULT CHARACTER SET utf8 ")); # Possible errors that can be ignored: # None. @@ -785,10 +785,6 @@ function upgrade_318_mysql() { $result = db_query_parsed($sql); } - # create constraint... - $result = db_query_parsed(" - ALTER TABLE $table_vacation_notification ADD CONSTRAINT `vacation_notification_pkey` - FOREIGN KEY (`on_vacation`) REFERENCES $table_vacation(`email`) ON DELETE CASCADE "); } @@ -800,7 +796,7 @@ function upgrade_344_mysql() { $table_fetchmail = table_by_key('fetchmail'); db_query_parsed( " - create table $table_fetchmail( + CREATE TABLE IF NOT EXISTS $table_fetchmail( id int(11) unsigned not null auto_increment, mailbox varchar(255) not null default '', src_server varchar(255) not null default '',