From 8e3c1822a60ed6c79b836d01545369ecdaf82203 Mon Sep 17 00:00:00 2001 From: Christian Boltz Date: Thu, 12 Sep 2013 20:07:41 +0000 Subject: [PATCH] upgrade.php: - upgrade_318_mysql(): mark vacation_notification.notified field as latin1 to avoid overlong index (no upgrade function needed - if it broke before, upgrade.php bailed out) http://sourceforge.net/p/postfixadmin/discussion/676076/thread/0c919cfd/ git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/branches/postfixadmin-2.3@1521 a1433add-5e2c-0410-b055-b7f2511e0802 --- CHANGELOG.TXT | 1 + upgrade.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.TXT b/CHANGELOG.TXT index 7133ff29..94bb679f 100644 --- a/CHANGELOG.TXT +++ b/CHANGELOG.TXT @@ -16,6 +16,7 @@ Changes since 2.3.6 release - when enabling/disabling a mailbox, also update the corresponding alias - fix creating superadmin in setup.php with MariaDB (more strict SQL) - trim() localpart in create-mailbox to avoid mailbox names with leading space + - mark vacation_notification.notified field as latin1 to avoid overlong index Version 2.3.6 - 2013/01/02 - SVN r1417 (postfixadmin-2.3 branch) ---------------------------------------------------------------- diff --git a/upgrade.php b/upgrade.php index 8857353c..17fd15a7 100644 --- a/upgrade.php +++ b/upgrade.php @@ -815,7 +815,7 @@ function upgrade_318_mysql() { db_query_parsed( " CREATE TABLE {IF_NOT_EXISTS} $table_vacation_notification ( on_vacation varchar(255) {LATIN1} NOT NULL, - notified varchar(255) NOT NULL, + notified varchar(255) {LATIN1} NOT NULL, notified_at timestamp NOT NULL default CURRENT_TIMESTAMP, PRIMARY KEY on_vacation (`on_vacation`, `notified`), CONSTRAINT `vacation_notification_pkey` @@ -827,7 +827,7 @@ function upgrade_318_mysql() { # in case someone has manually created the table with utf8 fields before: $all_sql = explode("\n", trim(" - ALTER TABLE `$table_vacation_notification` CHANGE `notified` `notified` VARCHAR( 255 ) NOT NULL + ALTER TABLE `$table_vacation_notification` CHANGE `notified` `notified` VARCHAR( 255 ) {LATIN1} NOT NULL ALTER TABLE `$table_vacation_notification` DEFAULT CHARACTER SET utf8 ")); # Possible errors that can be ignored: