Commit 6d023160 authored by Sam Hemelryk's avatar Sam Hemelryk
Browse files

lib-db MDL-25790 Added missing rating indexs on existing 2.0 sites

parent 15257dd1
......@@ -5936,6 +5936,24 @@ WHERE gradeitemid IS NOT NULL AND grademax IS NOT NULL");
upgrade_main_savepoint(true, 2011011414);
}
if ($oldversion < 2011011415) {
//create the rating table indexes if required
$table = new xmldb_table('rating');
$index = new xmldb_index('itemid', XMLDB_INDEX_NOTUNIQUE, array('itemid'));
if (!$dbman->index_exists($table, $index)) {
$dbman->add_index($table, $index);
$key = new xmldb_key('contextid', XMLDB_KEY_FOREIGN, array('contextid'), 'context', array('id'));
$dbman->add_key($table, $key);
$key = new xmldb_key('userid', XMLDB_KEY_FOREIGN, array('userid'), 'user', array('id'));
$dbman->add_key($table, $key);
}
upgrade_main_savepoint(true, 2011011415);
}
return true;
}
......
......@@ -29,7 +29,7 @@
defined('MOODLE_INTERNAL') || die();
$version = 2011011414; // YYYYMMDD = date of the last version bump
$version = 2011011415; // YYYYMMDD = date of the last version bump
// XX = daily increments
$release = '2.0.1+ (Build: 20110112)'; // Human-friendly version name
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment