mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 04:30:15 +01:00
MDL-71129 core_h5p: Added index for pathnamehash to h5p table
This commit is contained in:
parent
c6211a68b4
commit
6330c482bd
5
lib/db/install.xml
Normal file → Executable file
5
lib/db/install.xml
Normal file → Executable file
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<XMLDB PATH="lib/db" VERSION="20220616" COMMENT="XMLDB file for core Moodle tables"
|
||||
<XMLDB PATH="lib/db" VERSION="20220825" COMMENT="XMLDB file for core Moodle tables"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="../../lib/xmldb/xmldb.xsd"
|
||||
>
|
||||
@ -4364,6 +4364,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>
|
||||
|
@ -2903,5 +2903,16 @@ privatefiles,moodle|/user/files.php';
|
||||
upgrade_main_savepoint(true, 2022081200.01);
|
||||
}
|
||||
|
||||
if ($oldversion < 2022091000.01) {
|
||||
$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, 2022091000.01);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$version = 2022091000.00; // YYYYMMDD = weekly release date of this DEV branch.
|
||||
$version = 2022091000.01; // YYYYMMDD = weekly release date of this DEV branch.
|
||||
// RR = release increments - 00 in DEV branches.
|
||||
// .XX = incremental changes.
|
||||
$release = '4.1dev (Build: 20220910)'; // Human-friendly version name
|
||||
|
Loading…
x
Reference in New Issue
Block a user