Merge branch 'MDL-50805_MOODLE_29_STABLE' of https://github.com/crazyserver/moodle into MOODLE_29_STABLE
This commit is contained in:
@@ -565,6 +565,7 @@
|
||||
<INDEXES>
|
||||
<INDEX NAME="useridto" UNIQUE="false" FIELDS="useridto"/>
|
||||
<INDEX NAME="useridfromto" UNIQUE="false" FIELDS="useridfrom, useridto"/>
|
||||
<INDEX NAME="notificationtimeread" UNIQUE="false" FIELDS="notification, timeread"/>
|
||||
</INDEXES>
|
||||
</TABLE>
|
||||
<TABLE NAME="message_contacts" COMMENT="Maintains lists of relationships between users">
|
||||
|
||||
@@ -4455,5 +4455,20 @@ function xmldb_main_upgrade($oldversion) {
|
||||
upgrade_main_savepoint(true, 2015051101.07);
|
||||
}
|
||||
|
||||
if ($oldversion < 2015051102.03) {
|
||||
|
||||
// Define index notification (not unique) to be added to message_read.
|
||||
$table = new xmldb_table('message_read');
|
||||
$index = new xmldb_index('notificationtimeread', XMLDB_INDEX_NOTUNIQUE, array('notification', 'timeread'));
|
||||
|
||||
// Conditionally launch add index notification.
|
||||
if (!$dbman->index_exists($table, $index)) {
|
||||
$dbman->add_index($table, $index);
|
||||
}
|
||||
|
||||
// Main savepoint reached.
|
||||
upgrade_main_savepoint(true, 2015051102.03);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user