MDL-11719 increased size of idnumber in user table - needed for some enrolment plugins
This commit is contained in:
+1
-1
@@ -441,7 +441,7 @@
|
||||
<FIELD NAME="mnethostid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="deleted" NEXT="username"/>
|
||||
<FIELD NAME="username" TYPE="char" LENGTH="100" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="mnethostid" NEXT="password"/>
|
||||
<FIELD NAME="password" TYPE="char" LENGTH="32" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="username" NEXT="idnumber"/>
|
||||
<FIELD NAME="idnumber" TYPE="char" LENGTH="64" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="password" NEXT="firstname"/>
|
||||
<FIELD NAME="idnumber" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="password" NEXT="firstname"/>
|
||||
<FIELD NAME="firstname" TYPE="char" LENGTH="100" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="idnumber" NEXT="lastname"/>
|
||||
<FIELD NAME="lastname" TYPE="char" LENGTH="100" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="firstname" NEXT="email"/>
|
||||
<FIELD NAME="email" TYPE="char" LENGTH="100" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="lastname" NEXT="emailstop"/>
|
||||
|
||||
+31
-1
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user