summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2012-01-12 07:16:51 +0000
committeralecpl <alec@alec.pl>2012-01-12 07:16:51 +0000
commit3d4a482fd7527cfd8ee9b86df239b7a833535cd4 (patch)
treee94d1d3e2c27a5fc3eff993a357303a86e002ea6
parent5d950766df02862faf77adb0de24860840096bfd (diff)
- Fix failure on MySQL database upgrade from 0.7 - text column can't have default value (#1488300)
-rw-r--r--CHANGELOG1
-rw-r--r--SQL/mysql.initial.sql2
-rw-r--r--SQL/mysql.update.sql2
3 files changed, 3 insertions, 2 deletions
diff --git a/CHANGELOG b/CHANGELOG
index df704490f..1571cb28f 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,7 @@
CHANGELOG Roundcube Webmail
===========================
+- Fix failure on MySQL database upgrade from 0.7 - text column can't have default value (#1488300)
- Added address book widget on compose screen
- Use proper timezones from PHP's internal timezonedb (#1485592)
- Add separate pagesize setting for mail messages and contacts (#1488269)
diff --git a/SQL/mysql.initial.sql b/SQL/mysql.initial.sql
index f66bb1eee..b0a7ee7a9 100644
--- a/SQL/mysql.initial.sql
+++ b/SQL/mysql.initial.sql
@@ -101,7 +101,7 @@ CREATE TABLE `contacts` (
`changed` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
`del` tinyint(1) NOT NULL DEFAULT '0',
`name` varchar(128) NOT NULL DEFAULT '',
- `email` text NOT NULL DEFAULT '',
+ `email` text NOT NULL,
`firstname` varchar(128) NOT NULL DEFAULT '',
`surname` varchar(128) NOT NULL DEFAULT '',
`vcard` longtext NULL,
diff --git a/SQL/mysql.update.sql b/SQL/mysql.update.sql
index 0967c92ba..300ceb59d 100644
--- a/SQL/mysql.update.sql
+++ b/SQL/mysql.update.sql
@@ -223,7 +223,7 @@ ALTER TABLE `session` CHANGE `sess_id` `sess_id` varchar(128) NOT NULL;
ALTER TABLE `contacts` DROP FOREIGN KEY `user_id_fk_contacts`;
ALTER TABLE `contacts` DROP INDEX `user_contacts_index`;
-ALTER TABLE `contacts` MODIFY `email` text NOT NULL DEFAULT '';
+ALTER TABLE `contacts` MODIFY `email` text NOT NULL;
ALTER TABLE `contacts` ADD INDEX `user_contacts_index` (`user_id`,`del`);
ALTER TABLE `contacts` ADD CONSTRAINT `user_id_fk_contacts` FOREIGN KEY (`user_id`)
REFERENCES `users`(`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;