Merge branch 'MDL-75766-311' of https://github.com/aanabit/moodle into MOODLE_311_STABLE
This commit is contained in:
Regular → Executable
+4
-1
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<XMLDB PATH="lib/db" VERSION="20210422" COMMENT="XMLDB file for core Moodle tables"
|
||||
<XMLDB PATH="lib/db" VERSION="20221020" COMMENT="XMLDB file for core Moodle tables"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="../../lib/xmldb/xmldb.xsd"
|
||||
>
|
||||
@@ -4237,6 +4237,9 @@
|
||||
<KEY NAME="primary" TYPE="primary" FIELDS="id"/>
|
||||
<KEY NAME="mainlibraryid" TYPE="foreign" FIELDS="mainlibraryid" REFTABLE="h5p_libraries" REFFIELDS="id"/>
|
||||
</KEYS>
|
||||
<INDEXES>
|
||||
<INDEX NAME="pathnamehash_idx" UNIQUE="false" FIELDS="pathnamehash"/>
|
||||
</INDEXES>
|
||||
</TABLE>
|
||||
<TABLE NAME="h5p_contents_libraries" COMMENT="Store which library is used in which content.">
|
||||
<FIELDS>
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user