diff --git a/lib/db/install.xml b/lib/db/install.xml old mode 100644 new mode 100755 index c81044da8c7..dde051366f5 --- a/lib/db/install.xml +++ b/lib/db/install.xml @@ -1,5 +1,5 @@ - @@ -4237,6 +4237,9 @@ + + + diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index d24776ac519..9fda60ac5dd 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -2731,5 +2731,16 @@ function xmldb_main_upgrade($oldversion) { upgrade_main_savepoint(true, 2021051710.03); } + if ($oldversion < 2021051710.14) { + $table = new xmldb_table('h5p'); + $indexpathnamehash = new xmldb_index('pathnamehash_idx', XMLDB_INDEX_NOTUNIQUE, ['pathnamehash']); + + if (!$dbman->index_exists($table, $indexpathnamehash)) { + $dbman->add_index($table, $indexpathnamehash); + } + // Main savepoint reached. + upgrade_main_savepoint(true, 2021051710.14); + } + return true; }