Commit 598e9495 authored by Nigel McNie's avatar Nigel McNie
Browse files

Up the length of the username column to 100 characters, so it fits in...

Up the length of the username column to 100 characters, so it fits in "deleted" information on top of the 30 character limit enforced at the application level.
(cherry picked from commit e2319031)
parent ffdbc6f2
......@@ -60,7 +60,7 @@
<TABLE NAME="usr">
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true"/>
<FIELD NAME="username" TYPE="char" LENGTH="30" NOTNULL="true"/>
<FIELD NAME="username" TYPE="char" LENGTH="100" NOTNULL="true"/>
<FIELD NAME="password" TYPE="char" LENGTH="40" NOTNULL="true"/>
<FIELD NAME="salt" TYPE="char" LENGTH="8"/>
<FIELD NAME="passwordchange" TYPE="int" LENGTH="1" NOTNULL="true" DEFAULT="0"/>
......@@ -1280,6 +1280,17 @@ function xmldb_core_upgrade($oldversion=0) {
if ($oldversion < 2008091500) {
// NOTE: Yes, this number is bigger than the number for the next upgrade
// The next upgrade got committed first. It deletes all users properly,
// but the usr table has a 30 character limit on username, which can be
// violated when people with long usernames are deleted
$table = new XMLDBTable('usr');
$field = new XMLDBField('username');
$field->setAttributes(XMLDB_TYPE_CHAR, 100, null, XMLDB_NOTNULL);
change_field_precision($table, $field);
if ($oldversion < 2008091200) {
// Some cleanups for deleted users, based on the new model of handling them
if ($userids = get_column('usr', 'id', 'deleted', 1)) {
......@@ -27,7 +27,7 @@
defined('INTERNAL') || die();
$config = new StdClass;
$config->version = 2008091200;
$config->version = 2008091500;
$config->release = '1.1.0alpha2dev';
$config->minupgradefrom = 2007080700;
$config->minupgraderelease = '0.8.0 (release tag 0.8.0_RELEASE)';
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment