Merge branch 'MDL-51412_qtype_index' of git://github.com/davosmith/moodle
authorDan Poltawski <dan@moodle.com>
Tue, 22 Sep 2015 07:58:57 +0000 (08:58 +0100)
committerDan Poltawski <dan@moodle.com>
Tue, 22 Sep 2015 08:00:00 +0000 (09:00 +0100)
1  2 
lib/db/install.xml
lib/db/upgrade.php
version.php

@@@ -1,5 -1,5 +1,5 @@@
  <?xml version="1.0" encoding="UTF-8" ?>
- <XMLDB PATH="lib/db" VERSION="20150824" COMMENT="XMLDB file for core Moodle tables"
 -<XMLDB PATH="lib/db" VERSION="20150915" COMMENT="XMLDB file for core Moodle tables"
++<XMLDB PATH="lib/db" VERSION="20150922" COMMENT="XMLDB file for core Moodle tables"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:noNamespaceSchemaLocation="../../lib/xmldb/xmldb.xsd"
  >
@@@ -4558,5 -4558,19 +4558,19 @@@ function xmldb_main_upgrade($oldversion
          upgrade_main_savepoint(true, 2015090801.00);
      }
  
 -    if ($oldversion < 2015091500.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, 2015091500.00);
++        upgrade_main_savepoint(true, 2015092200.00);
+     }
      return true;
  }
diff --cc version.php
@@@ -29,7 -29,7 +29,7 @@@
  
  defined('MOODLE_INTERNAL') || die();
  
- $version  = 2015091800.00;              // YYYYMMDD      = weekly release date of this DEV branch.
 -$version  = 2015091000.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.