Skip to content
Browse files

MDL-34600 fix question table to match install.xml

The oldquestiontextformat was used during previous upgrade and is not necessary any more.
Next time we should add these temporary upgrade columns to install.xml files.
  • Loading branch information...
1 parent 9881439 commit b97532dd8e5164c00bebbba50c0fabfdb4eb9bb4 @skodak skodak committed with danpoltawski Jul 27, 2012
Showing with 14 additions and 1 deletion.
  1. +13 −0 lib/db/upgrade.php
  2. +1 −1 version.php
View
13 lib/db/upgrade.php
@@ -937,5 +937,18 @@ function xmldb_main_upgrade($oldversion) {
upgrade_main_savepoint(true, 2012062501.06);
}
+ if ($oldversion < 2012062501.08) {
+ // Drop obsolete question upgrade field that should have been added to the install.xml.
+ $table = new xmldb_table('question');
+ $field = new xmldb_field('oldquestiontextformat', XMLDB_TYPE_INTEGER, '2', null, XMLDB_NOTNULL, null, '0');
+
+ if ($dbman->field_exists($table, $field)) {
+ $dbman->drop_field($table, $field);
+ }
+
+ upgrade_main_savepoint(true, 2012062501.08);
+ }
+
+
return true;
}
View
2 version.php
@@ -30,7 +30,7 @@
defined('MOODLE_INTERNAL') || die();
-$version = 2012062501.07; // YYYYMMDD = weekly release date of this DEV branch
+$version = 2012062501.08; // YYYYMMDD = weekly release date of this DEV branch
// RR = release increments - 00 in DEV branches
// .XX = incremental changes

0 comments on commit b97532d

Please sign in to comment.
Something went wrong with that request. Please try again.