Permalink
Browse files

MDL-15156 fix conflict in schema for MNET PREFIX_mnet_enrol_course table

  • Loading branch information...
1 parent e724b50 commit 7aa74e036b17b27e09953c2cbd66fdc9b6e8dde9 cataluke committed Jun 12, 2008
Showing with 9 additions and 2 deletions.
  1. +1 −1 lib/db/install.xml
  2. +7 −0 lib/db/upgrade.php
  3. +1 −1 version.php
View
@@ -942,7 +942,7 @@
<FIELD NAME="cat_id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="remoteid" NEXT="cat_name"/>
<FIELD NAME="cat_name" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="cat_id" NEXT="cat_description"/>
<FIELD NAME="cat_description" TYPE="text" LENGTH="medium" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="cat_name" NEXT="sortorder"/>
- <FIELD NAME="sortorder" TYPE="int" LENGTH="4" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="cat_description" NEXT="fullname"/>
+ <FIELD NAME="sortorder" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" ENUM="false" PREVIOUS="cat_description" NEXT="fullname"/>
<FIELD NAME="fullname" TYPE="char" LENGTH="254" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="sortorder" NEXT="shortname"/>
<FIELD NAME="shortname" TYPE="char" LENGTH="15" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="fullname" NEXT="idnumber"/>
<FIELD NAME="idnumber" TYPE="char" LENGTH="100" NOTNULL="true" SEQUENCE="false" ENUM="false" PREVIOUS="shortname" NEXT="summary"/>
View
@@ -3015,6 +3015,13 @@ function xmldb_main_upgrade($oldversion=0) {
upgrade_main_savepoint($result, 2007101513);
}
+ if ($result && $oldversion < 2007101514) {
+ $table = new XMLDBTable('mnet_enrol_course');
+ $field = new XMLDBField('sortorder');
+ $field->setAttributes(XMLDB_TYPE_INTEGER, '10', true, true, null, false, false, 0);
+ $result = change_field_precision($table, $field);
+ }
+
return $result;
}
View
@@ -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 = 2007101513; // YYYYMMDD = date of the 1.9 branch (don't change)
+ $version = 2007101514; // 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

0 comments on commit 7aa74e0

Please sign in to comment.