diff --git a/lib/db/install.xml b/lib/db/install.xml index f25945e6002..e52e7d70bf4 100644 --- a/lib/db/install.xml +++ b/lib/db/install.xml @@ -1,5 +1,5 @@ - @@ -688,6 +688,9 @@ + + + diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index 41f1d0469cf..2b71b073e20 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -2680,5 +2680,17 @@ function xmldb_main_upgrade($oldversion) { upgrade_main_savepoint(true, 2019011801.01); } + if ($oldversion < 2019011801.02) { + // Add index 'useridfrom' to the table 'notifications'. + $table = new xmldb_table('notifications'); + $index = new xmldb_index('useridfrom', XMLDB_INDEX_NOTUNIQUE, ['useridfrom']); + + if (!$dbman->index_exists($table, $index)) { + $dbman->add_index($table, $index); + } + + upgrade_main_savepoint(true, 2019011801.02); + } + return true; } diff --git a/version.php b/version.php index a6d89f8fecb..7f7991fd1d7 100644 --- a/version.php +++ b/version.php @@ -29,7 +29,7 @@ defined('MOODLE_INTERNAL') || die(); -$version = 2019011801.01; // YYYYMMDD = weekly release date of this DEV branch. +$version = 2019011801.02; // YYYYMMDD = weekly release date of this DEV branch. // RR = release increments - 00 in DEV branches. // .XX = incremental changes.