From 1fbb06abee7dc7797f5ab3c70faa35ff9a6939a1 Mon Sep 17 00:00:00 2001 From: Dries Buytaert <dries@buytaert.net> Date: Wed, 20 Oct 2010 00:37:20 +0000 Subject: [PATCH] - Patch ##864020 by Jose Reyero, catch, sun: locale upgrade to D7 fails due to index added by i18nstrings module. --- modules/locale/locale.install | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/modules/locale/locale.install b/modules/locale/locale.install index 5398c9495238..c51033ea7276 100644 --- a/modules/locale/locale.install +++ b/modules/locale/locale.install @@ -38,7 +38,19 @@ function locale_install() { function locale_update_7000() { db_drop_index('locales_source', 'source'); db_add_index('locales_source', 'source_context', array(array('source', 30), 'context')); - db_change_field('locales_source', 'location', 'location', array('type' => 'text', 'size' => 'big', 'not null' => FALSE)); + + // Also drop the 'textgroup_location' index added by the i18nstrings module + // of the i18n project, which prevents the below schema update from running. + if (db_index_exists('locales_source', 'textgroup_location')) { + db_drop_index('locales_source', 'textgroup_location'); + } + + db_change_field('locales_source', 'location', 'location', array( + 'type' => 'text', + 'not null' => FALSE, + 'size' => 'big', + 'description' => 'Drupal path in case of online discovered translations or file path in case of imported strings.', + )); } /** -- GitLab