Skip to content

Commit

Permalink
Merge branch 'MDL-50805_MOODLE_29_STABLE' of https://github.com/crazy…
Browse files Browse the repository at this point in the history
…server/moodle into MOODLE_29_STABLE
  • Loading branch information
andrewnicols committed Oct 6, 2015
2 parents 8aa7c69 + 00a5145 commit e735a8f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/db/install.xml
Expand Up @@ -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">
Expand Down
15 changes: 15 additions & 0 deletions lib/db/upgrade.php
Expand Up @@ -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;
}

0 comments on commit e735a8f

Please sign in to comment.