From 449f1f7cbd5399b1ad092378d1fcf80e91507cb0 Mon Sep 17 00:00:00 2001
From: Angie Byron <webchick@24967.no-reply.drupal.org>
Date: Wed, 7 Jul 2010 05:44:03 +0000
Subject: [PATCH] #845746 by Berdir: Fixed update process broken on
 multi-language sites using i18n module.

---
 includes/update.inc           | 5 +++++
 modules/locale/locale.install | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/includes/update.inc b/includes/update.inc
index 7db61191e5f1..c3fde15b1cc0 100644
--- a/includes/update.inc
+++ b/includes/update.inc
@@ -591,6 +591,11 @@ function update_fix_d7_requirements() {
     // Add new primary key.
     db_add_primary_key('sessions', array('sid', 'ssid'));
 
+    // Allow longer javascript file names.
+    if (db_table_exists('languages')) {
+      db_change_field('languages', 'javascript', 'javascript', array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => ''));
+    }
+
     variable_set('update_d7_requirements', TRUE);
   }
 
diff --git a/modules/locale/locale.install b/modules/locale/locale.install
index 4269023b3552..c8d8e6e00492 100644
--- a/modules/locale/locale.install
+++ b/modules/locale/locale.install
@@ -106,7 +106,7 @@ function locale_update_7001() {
  * Allow longer javascript file names.
  */
 function locale_update_7002() {
-  db_change_field('languages', 'javascript', 'javascript', array('type' => 'varchar', 'length' => 64, 'not null' => TRUE, 'default' => ''));
+  // Update moved to update_fix_d7_requirements().
 }
 
 /**
-- 
GitLab