diff --git a/lib/db/install.xml b/lib/db/install.xml index 837a7559d52..9a0f927097c 100644 --- a/lib/db/install.xml +++ b/lib/db/install.xml @@ -1,5 +1,5 @@ - @@ -1248,6 +1248,9 @@ + + + diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index 221943a32b4..fd98221e183 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -4558,5 +4558,19 @@ function xmldb_main_upgrade($oldversion) { upgrade_main_savepoint(true, 2015090801.00); } + if ($oldversion < 2015092200.00) { + // Define index qtype (not unique) to be added to question. + $table = new xmldb_table('question'); + $index = new xmldb_index('qtype', XMLDB_INDEX_NOTUNIQUE, array('qtype')); + + // Conditionally launch add index qtype. + if (!$dbman->index_exists($table, $index)) { + $dbman->add_index($table, $index); + } + + // Main savepoint reached. + upgrade_main_savepoint(true, 2015092200.00); + } + return true; } diff --git a/version.php b/version.php index a827fdb5d41..08702526e61 100644 --- a/version.php +++ b/version.php @@ -29,7 +29,7 @@ defined('MOODLE_INTERNAL') || die(); -$version = 2015091800.00; // YYYYMMDD = weekly release date of this DEV branch. +$version = 2015092200.00; // YYYYMMDD = weekly release date of this DEV branch. // RR = release increments - 00 in DEV branches. // .XX = incremental changes.