diff --git a/lib/db/install.xml b/lib/db/install.xml
index 69b53b2f7fb..ddb23c5151e 100644
--- a/lib/db/install.xml
+++ b/lib/db/install.xml
@@ -441,7 +441,7 @@
-
+
diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php
index 180678a97fa..8a7f91575bd 100644
--- a/lib/db/upgrade.php
+++ b/lib/db/upgrade.php
@@ -2966,7 +2966,37 @@ function xmldb_main_upgrade($oldversion=0) {
}
}
}
-
+
+ if ($result && $oldversion < 2007101512) {
+ notify('Increasing size of user idnumber field, this may take a while...', 'notifysuccess');
+
+ /// Define index idnumber (not unique) to be dropped form user
+ $table = new XMLDBTable('user');
+ $index = new XMLDBIndex('idnumber');
+ $index->setAttributes(XMLDB_INDEX_NOTUNIQUE, array('idnumber'));
+
+ /// Launch drop index idnumber
+ if (index_exists($table, $index)) {
+ $result = $result && drop_index($table, $index);
+ }
+
+ /// Changing precision of field idnumber on table user to (255)
+ $table = new XMLDBTable('user');
+ $field = new XMLDBField('idnumber');
+ $field->setAttributes(XMLDB_TYPE_CHAR, '255', null, XMLDB_NOTNULL, null, null, null, null, 'password');
+
+ /// Launch change of precision for field idnumber
+ $result = $result && change_field_precision($table, $field);
+
+ /// Launch add index idnumber again
+ $index = new XMLDBIndex('idnumber');
+ $index->setAttributes(XMLDB_INDEX_NOTUNIQUE, array('idnumber'));
+ $result = $result && add_index($table, $index);
+
+ /// Main savepoint reached
+ upgrade_main_savepoint($result, 2007101512);
+ }
+
return $result;
}
diff --git a/version.php b/version.php
index ade53d7c7a3..a31c51ee4d3 100644
--- a/version.php
+++ b/version.php
@@ -6,7 +6,7 @@
// This is compared against the values stored in the database to determine
// whether upgrades should be performed (see lib/db/*.php)
- $version = 2007101511; // YYYYMMDD = date of the 1.9 branch (don't change)
+ $version = 2007101512; // YYYYMMDD = date of the 1.9 branch (don't change)
// X = release number 1.9.[0,1,2,3...]
// Y.YY = micro-increments between releases