diff --git a/lib/db/install.xml b/lib/db/install.xml index 8e4dd6215f0..51e9ac16601 100644 --- a/lib/db/install.xml +++ b/lib/db/install.xml @@ -1,5 +1,5 @@ - @@ -676,6 +676,9 @@ + + + diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index 682ce58bf6a..4fa1f58ec07 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -2361,5 +2361,17 @@ function xmldb_main_upgrade($oldversion) { upgrade_main_savepoint(true, 2018051704.02); } + if ($oldversion < 2018051704.03) { + // 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, 2018051704.03); + } + return true; } diff --git a/version.php b/version.php index 48269860341..89c8802a5d7 100644 --- a/version.php +++ b/version.php @@ -29,7 +29,7 @@ defined('MOODLE_INTERNAL') || die(); -$version = 2018051704.02; // 20180517 = branching date YYYYMMDD - do not modify! +$version = 2018051704.03; // 20180517 = branching date YYYYMMDD - do not modify! // RR = release increments - 00 in DEV branches. // .XX = incremental changes.