MDL-17537 course request: shortname in course_request is now the same length as in course table - 100 chars

This commit is contained in:
skodak
2008-12-07 22:13:39 +00:00
parent 7325b01691
commit 745c0ee508
3 changed files with 16 additions and 3 deletions
+1 -1
View File
@@ -225,7 +225,7 @@
<FIELDS>
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" ENUM="false" NEXT="fullname"/>
<FIELD NAME="fullname" TYPE="char" LENGTH="254" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="id" NEXT="shortname"/>
<FIELD NAME="shortname" TYPE="char" LENGTH="15" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="fullname" NEXT="summary"/>
<FIELD NAME="shortname" TYPE="char" LENGTH="100" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="fullname" NEXT="summary"/>
<FIELD NAME="summary" TYPE="text" LENGTH="small" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="shortname" NEXT="reason"/>
<FIELD NAME="reason" TYPE="text" LENGTH="small" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="summary" NEXT="requester"/>
<FIELD NAME="requester" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="reason" NEXT="password"/>
+14 -1
View File
@@ -1109,7 +1109,20 @@ function xmldb_main_upgrade($oldversion) {
/// Main savepoint reached
upgrade_main_savepoint($result, 2008112400);
}
if ($result && $oldversion < 2008120700) {
/// Changing precision of field shortname on table course_request to (100)
$table = new xmldb_table('course_request');
$field = new xmldb_field('shortname', XMLDB_TYPE_CHAR, '100', null, XMLDB_NOTNULL, null, null, null, null, 'fullname');
/// Launch change of precision for field shortname
$dbman->change_field_precision($table, $field);
/// Main savepoint reached
upgrade_main_savepoint($result, 2008120700);
}
return $result;
}
+1 -1
View File
@@ -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 = 2008120400; // YYYYMMDD = date of the last version bump
$version = 2008120700; // YYYYMMDD = date of the last version bump
// XX = daily increments
$release = '2.0 dev (Build: 20081207)'; // Human-friendly version name