Commit 8cdfa869 authored by Damyon Wiese's avatar Damyon Wiese

Merge branch 'MDL-59438-master' of git://github.com/rezaies/moodle

parents a34a305d 9d27b68c
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<XMLDB PATH="lib/db" VERSION="20171026" COMMENT="XMLDB file for core Moodle tables" <XMLDB PATH="lib/db" VERSION="20171205" COMMENT="XMLDB file for core Moodle tables"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../lib/xmldb/xmldb.xsd" xsi:noNamespaceSchemaLocation="../../lib/xmldb/xmldb.xsd"
> >
...@@ -449,12 +449,14 @@ ...@@ -449,12 +449,14 @@
<KEYS> <KEYS>
<KEY NAME="primary" TYPE="primary" FIELDS="id"/> <KEY NAME="primary" TYPE="primary" FIELDS="id"/>
<KEY NAME="categoryid" TYPE="foreign" FIELDS="categoryid" REFTABLE="course_categories" REFFIELDS="id"/> <KEY NAME="categoryid" TYPE="foreign" FIELDS="categoryid" REFTABLE="course_categories" REFFIELDS="id"/>
<KEY NAME="subscriptionid" TYPE="foreign" FIELDS="subscriptionid" REFTABLE="event_subscriptions" REFFIELDS="id"/>
</KEYS> </KEYS>
<INDEXES> <INDEXES>
<INDEX NAME="courseid" UNIQUE="false" FIELDS="courseid"/> <INDEX NAME="courseid" UNIQUE="false" FIELDS="courseid"/>
<INDEX NAME="userid" UNIQUE="false" FIELDS="userid"/> <INDEX NAME="userid" UNIQUE="false" FIELDS="userid"/>
<INDEX NAME="timestart" UNIQUE="false" FIELDS="timestart"/> <INDEX NAME="timestart" UNIQUE="false" FIELDS="timestart"/>
<INDEX NAME="timeduration" UNIQUE="false" FIELDS="timeduration"/> <INDEX NAME="timeduration" UNIQUE="false" FIELDS="timeduration"/>
<INDEX NAME="uuid" UNIQUE="false" FIELDS="uuid"/>
<INDEX NAME="type-timesort" UNIQUE="false" FIELDS="type, timesort"/> <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="groupid-courseid-categoryid-visible-userid" UNIQUE="false" FIELDS="groupid, courseid, categoryid, visible, userid" COMMENT="used for calendar view"/>
</INDEXES> </INDEXES>
...@@ -3760,4 +3762,4 @@ ...@@ -3760,4 +3762,4 @@
</KEYS> </KEYS>
</TABLE> </TABLE>
</TABLES> </TABLES>
</XMLDB> </XMLDB>
\ No newline at end of file
...@@ -1837,5 +1837,27 @@ function xmldb_main_upgrade($oldversion) { ...@@ -1837,5 +1837,27 @@ function xmldb_main_upgrade($oldversion) {
upgrade_main_savepoint(true, 2017111300.02); upgrade_main_savepoint(true, 2017111300.02);
} }
if ($oldversion < 2017121200.00) {
// Define key subscriptionid (foreign) to be added to event.
$table = new xmldb_table('event');
$key = new xmldb_key('subscriptionid', XMLDB_KEY_FOREIGN, array('subscriptionid'), 'event_subscriptions', array('id'));
// Launch add key subscriptionid.
$dbman->add_key($table, $key);
// Define index uuid (not unique) to be added to event.
$table = new xmldb_table('event');
$index = new xmldb_index('uuid', XMLDB_INDEX_NOTUNIQUE, array('uuid'));
// Conditionally launch add index uuid.
if (!$dbman->index_exists($table, $index)) {
$dbman->add_index($table, $index);
}
// Main savepoint reached.
upgrade_main_savepoint(true, 2017121200.00);
}
return true; return true;
} }
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
defined('MOODLE_INTERNAL') || die(); defined('MOODLE_INTERNAL') || die();
$version = 2017120800.00; // YYYYMMDD = weekly release date of this DEV branch. $version = 2017121200.00; // YYYYMMDD = weekly release date of this DEV branch.
// RR = release increments - 00 in DEV branches. // RR = release increments - 00 in DEV branches.
// .XX = incremental changes. // .XX = incremental changes.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment