MDL-63493 core_question: Fix field parameters for the index definitions

* The fields for the ID number-related indexes that were created for
  the question and question_categories tables in MDL-62708 should not
  be in comma-separated strings.
This commit is contained in:
Jun Pataleta
2018-10-02 11:31:36 +08:00
parent 0410cee69e
commit b79482f5d7
+2 -2
View File
@@ -2373,7 +2373,7 @@ function xmldb_main_upgrade($oldversion) {
if ($oldversion < 2018092100.02) {
$table = new xmldb_table('question');
$index = new xmldb_index('categoryidnumber', XMLDB_INDEX_UNIQUE, array('category, idnumber'));
$index = new xmldb_index('categoryidnumber', XMLDB_INDEX_UNIQUE, array('category', 'idnumber'));
if (!$dbman->index_exists($table, $index)) {
$dbman->add_index($table, $index);
}
@@ -2391,7 +2391,7 @@ function xmldb_main_upgrade($oldversion) {
if ($oldversion < 2018092100.04) {
$table = new xmldb_table('question_categories');
$index = new xmldb_index('contextididnumber', XMLDB_INDEX_UNIQUE, array('contextid, idnumber'));
$index = new xmldb_index('contextididnumber', XMLDB_INDEX_UNIQUE, array('contextid', 'idnumber'));
if (!$dbman->index_exists($table, $index)) {
$dbman->add_index($table, $index);
}