Merge branch 'MDL-69760-master' of https://github.com/inkjet2000/moodle into master

This commit is contained in:
Eloy Lafuente (stronk7) 2020-10-08 00:23:47 +02:00
commit 753bda3d58
3 changed files with 28 additions and 4 deletions

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<XMLDB PATH="lib/db" VERSION="20200911" COMMENT="XMLDB file for core Moodle tables"
<XMLDB PATH="lib/db" VERSION="20201007" COMMENT="XMLDB file for core Moodle tables"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../lib/xmldb/xmldb.xsd"
>
@ -464,8 +464,8 @@
<INDEX NAME="type-timesort" UNIQUE="false" FIELDS="type, timesort"/>
<INDEX NAME="groupid-courseid-categoryid-visible-userid" UNIQUE="false" FIELDS="groupid, courseid, categoryid, visible, userid" COMMENT="used for calendar view"/>
<INDEX NAME="eventtype" UNIQUE="false" FIELDS="eventtype"/>
<INDEX NAME="modulename-instance" UNIQUE="false" FIELDS="modulename, instance"/>
<INDEX NAME="component" UNIQUE="false" FIELDS="component, eventtype, instance"/>
<INDEX NAME="modulename-instance-eventtype" UNIQUE="false" FIELDS="modulename, instance, eventtype" COMMENT="Improve performance on assign adhoc tasks."/>
</INDEXES>
</TABLE>
<TABLE NAME="cache_filters" COMMENT="For keeping information about cached data">
@ -4320,4 +4320,4 @@
</INDEXES>
</TABLE>
</TABLES>
</XMLDB>
</XMLDB>

View File

@ -2738,5 +2738,29 @@ function xmldb_main_upgrade($oldversion) {
upgrade_main_savepoint(true, 2021052500.19);
}
if ($oldversion < 2021052500.20) {
// Define index modulename-instance-eventtype (not unique) to be added to event.
$table = new xmldb_table('event');
$index = new xmldb_index('modulename-instance-eventtype', XMLDB_INDEX_NOTUNIQUE, ['modulename', 'instance', 'eventtype']);
// Conditionally launch add index modulename-instance-eventtype.
if (!$dbman->index_exists($table, $index)) {
$dbman->add_index($table, $index);
}
// Define index modulename-instance (not unique) to be dropped form event.
$table = new xmldb_table('event');
$index = new xmldb_index('modulename-instance', XMLDB_INDEX_NOTUNIQUE, ['modulename', 'instance']);
// Conditionally launch drop index modulename-instance.
if ($dbman->index_exists($table, $index)) {
$dbman->drop_index($table, $index);
}
// Main savepoint reached.
upgrade_main_savepoint(true, 2021052500.20);
}
return true;
}

View File

@ -29,7 +29,7 @@
defined('MOODLE_INTERNAL') || die();
$version = 2021052500.19; // YYYYMMDD = weekly release date of this DEV branch.
$version = 2021052500.20; // YYYYMMDD = weekly release date of this DEV branch.
// RR = release increments - 00 in DEV branches.
// .XX = incremental changes.
$release = '4.0dev (Build: 20201006)'; // Human-friendly version name