From f5a4d4a299cb398594f6a1ce2fb30cec6c2b05dd Mon Sep 17 00:00:00 2001
From: John Ennew <johne@deeson.co.uk>
Date: Fri, 31 Aug 2012 11:00:15 +0100
Subject: [PATCH] Issue #1762184 by ceng: Lenghted the language field to 11
 characters, the longest returned by the
 _locale_get_predefined_list

---
 push_notifications.install |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/push_notifications.install b/push_notifications.install
index 96a3864..2d35180 100644
--- a/push_notifications.install
+++ b/push_notifications.install
@@ -64,7 +64,7 @@ function push_notifications_schema() {
       'language' => array(
         'description' => 'Language',
         'type' => 'varchar',
-        'length' => 2,
+        'length' => 11,
         'not null' => TRUE,
       ),
     ),
@@ -125,4 +125,14 @@ function push_notifications_update_7002() {
     ),
   );
   db_change_field($table, $field, $field, $token_new, $indexes_new);
-}
\ No newline at end of file
+}
+
+/**
+ * Update the language field to allow 11 characters.
+ */
+function push_notifications_update_7003() {
+  $table = 'push_notifications_tokens';
+  $field = 'language';
+  $schema = push_notifications_schema();
+  db_change_field($table, $field, $field, $schema[$table]['fields'][$field]);
+}
-- 
1.7.7

