Skip to content

Commit

Permalink
Merge branch 'MDL-45642' of git://github.com/timhunt/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
danpoltawski committed Aug 12, 2014
2 parents 134b1e4 + bbea936 commit 70c16c5
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/db/install.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<XMLDB PATH="lib/db" VERSION="20140627" COMMENT="XMLDB file for core Moodle tables"
<XMLDB PATH="lib/db" VERSION="20140808" COMMENT="XMLDB file for core Moodle tables"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../lib/xmldb/xmldb.xsd"
>
Expand Down Expand Up @@ -1323,6 +1323,7 @@
</KEYS>
<INDEXES>
<INDEX NAME="questionusageid-slot" UNIQUE="true" FIELDS="questionusageid, slot"/>
<INDEX NAME="behaviour" UNIQUE="false" FIELDS="behaviour" COMMENT="Required because we need to be able to determine efficiently which behaviours are in use."/>
</INDEXES>
</TABLE>
<TABLE NAME="question_attempt_steps" COMMENT="Stores one step in in a question attempt. As well as the data here, the step will have some data in the question_attempt_step_data table.">
Expand Down
15 changes: 15 additions & 0 deletions lib/db/upgrade.php
Expand Up @@ -3719,5 +3719,20 @@ function xmldb_main_upgrade($oldversion) {
upgrade_main_savepoint(true, 2014072400.01);
}

if ($oldversion < 2014080801.00) {

// Define index behaviour (not unique) to be added to question_attempts.
$table = new xmldb_table('question_attempts');
$index = new xmldb_index('behaviour', XMLDB_INDEX_NOTUNIQUE, array('behaviour'));

// Conditionally launch add index behaviour.
if (!$dbman->index_exists($table, $index)) {
$dbman->add_index($table, $index);
}

// Main savepoint reached.
upgrade_main_savepoint(true, 2014080801.00);
}

return true;
}
2 changes: 1 addition & 1 deletion version.php
Expand Up @@ -29,7 +29,7 @@

defined('MOODLE_INTERNAL') || die();

$version = 2014080700.00; // YYYYMMDD = weekly release date of this DEV branch.
$version = 2014080801.00; // YYYYMMDD = weekly release date of this DEV branch.
// RR = release increments - 00 in DEV branches.
// .XX = incremental changes.

Expand Down

0 comments on commit 70c16c5

Please sign in to comment.