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

* The fields for the ID number-related indexes that were created for
  the messages and message_user_actions tables in MDL-36941 should not
  be in comma-separated strings.
This commit is contained in:
Jun Pataleta 2018-10-02 11:31:02 +08:00
parent 5211af1658
commit 9af75abf69

View file

@ -2167,7 +2167,7 @@ function xmldb_main_upgrade($oldversion) {
$table = new xmldb_table('message_user_actions'); $table = new xmldb_table('message_user_actions');
// Conditionally launch add index. // Conditionally launch add index.
$index = new xmldb_index('userid_messageid_action', XMLDB_INDEX_UNIQUE, array('userid, messageid, action')); $index = new xmldb_index('userid_messageid_action', XMLDB_INDEX_UNIQUE, array('userid', 'messageid', 'action'));
if (!$dbman->index_exists($table, $index)) { if (!$dbman->index_exists($table, $index)) {
$dbman->add_index($table, $index); $dbman->add_index($table, $index);
} }
@ -2181,7 +2181,7 @@ function xmldb_main_upgrade($oldversion) {
$table = new xmldb_table('messages'); $table = new xmldb_table('messages');
// Conditionally launch add index. // Conditionally launch add index.
$index = new xmldb_index('conversationid_timecreated', XMLDB_INDEX_NOTUNIQUE, array('conversationid, timecreated')); $index = new xmldb_index('conversationid_timecreated', XMLDB_INDEX_NOTUNIQUE, array('conversationid', 'timecreated'));
if (!$dbman->index_exists($table, $index)) { if (!$dbman->index_exists($table, $index)) {
$dbman->add_index($table, $index); $dbman->add_index($table, $index);
} }