From faf10e8fec3dcd4439a3a22cb2e3877c4b622b33 Mon Sep 17 00:00:00 2001 From: thomascube <thomas@roundcube.net> Date: Sun, 14 Aug 2011 15:02:33 -0400 Subject: [PATCH] Fix automatic db updates; trigger contact indexing after upgrade --- bin/update.sh | 4 ++++ SQL/sqlite.update.sql | 5 ++++- SQL/postgres.update.sql | 5 ++++- SQL/mysql.update.sql | 5 ++++- UPGRADING | 3 ++- SQL/mssql.upgrade.sql | 5 ++++- 6 files changed, 22 insertions(+), 5 deletions(-) diff --git a/SQL/mssql.upgrade.sql b/SQL/mssql.upgrade.sql index c9909ef..606db60 100644 --- a/SQL/mssql.upgrade.sql +++ b/SQL/mssql.upgrade.sql @@ -97,7 +97,10 @@ ALTER TABLE [dbo].[contacts] ALTER COLUMN [email] [varchar] (255) COLLATE Latin1_General_CI_AI NOT NULL GO --- Updates from version 0.5.X +-- Updates from version 0.5.1 +-- Updates from version 0.5.2 +-- Updates from version 0.5.3 +-- Updates from version 0.5.4 ALTER TABLE [dbo].[contacts] ADD [words] [text] COLLATE Latin1_General_CI_AI NULL GO diff --git a/SQL/mysql.update.sql b/SQL/mysql.update.sql index 3843bd7..ed21bda 100644 --- a/SQL/mysql.update.sql +++ b/SQL/mysql.update.sql @@ -133,7 +133,10 @@ TRUNCATE TABLE `messages`; --- Updates from version 0.5.X +-- Updates from version 0.5.1 +-- Updates from version 0.5.2 +-- Updates from version 0.5.3 +-- Updates from version 0.5.4 ALTER TABLE `contacts` ADD `words` TEXT NULL AFTER `vcard`; ALTER TABLE `contacts` CHANGE `vcard` `vcard` LONGTEXT /*!40101 CHARACTER SET utf8 */ NULL DEFAULT NULL; diff --git a/SQL/postgres.update.sql b/SQL/postgres.update.sql index d1bf824..94513c5 100644 --- a/SQL/postgres.update.sql +++ b/SQL/postgres.update.sql @@ -90,7 +90,10 @@ TRUNCATE messages; --- Updates from version 0.5.X +-- Updates from version 0.5.1 +-- Updates from version 0.5.2 +-- Updates from version 0.5.3 +-- Updates from version 0.5.4 ALTER TABLE contacts ADD words TEXT NULL; CREATE INDEX contactgroupmembers_contact_id_idx ON contactgroupmembers (contact_id); diff --git a/SQL/sqlite.update.sql b/SQL/sqlite.update.sql index 229ed4d..30c3ae9 100644 --- a/SQL/sqlite.update.sql +++ b/SQL/sqlite.update.sql @@ -183,7 +183,10 @@ DELETE FROM messages; --- Updates from version 0.5.X +-- Updates from version 0.5.1 +-- Updates from version 0.5.2 +-- Updates from version 0.5.3 +-- Updates from version 0.5.4 CREATE TABLE contacts_tmp ( contact_id integer NOT NULL PRIMARY KEY, diff --git a/UPGRADING b/UPGRADING index 7df82b0..ce951d1 100644 --- a/UPGRADING +++ b/UPGRADING @@ -19,7 +19,8 @@ target location and check and update the configuration and database schema. After all is done, the temporary folder with the new Roundcube files can be removed again. -See Post-Upgrade Activities section. + +Please also see Post-Upgrade Activities section. Updating manually diff --git a/bin/update.sh b/bin/update.sh index 9f91c8e..52ac637 100755 --- a/bin/update.sh +++ b/bin/update.sh @@ -162,6 +162,10 @@ } } + // index contacts for fulltext searching + if (version_compare($opts['version'], '0.6', '<')) { + system(INSTALL_PATH . 'bin/indexcontacts.sh'); + } if ($success) { echo "This instance of Roundcube is up-to-date.\n"; -- Gitblit v1.9.1