Merge branch 'MDL-59438-master' of git://github.com/rezaies/moodle
authorDamyon Wiese <damyon@moodle.com>
Tue, 12 Dec 2017 04:56:19 +0000 (12:56 +0800)
committerDamyon Wiese <damyon@moodle.com>
Tue, 12 Dec 2017 05:05:22 +0000 (13:05 +0800)
1  2 
lib/db/upgrade.php
version.php

diff --combined lib/db/upgrade.php
@@@ -1837,5 -1837,27 +1837,27 @@@ function xmldb_main_upgrade($oldversion
          upgrade_main_savepoint(true, 2017111300.02);
      }
  
 -    if ($oldversion < 2017120100.01) {
++    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, 2017120100.01);
++        upgrade_main_savepoint(true, 2017121200.00);
+     }
      return true;
  }
diff --combined version.php
@@@ -29,7 -29,7 +29,7 @@@
  
  defined('MOODLE_INTERNAL') || die();
  
- $version  = 2017120800.00;              // YYYYMMDD      = weekly release date of this DEV branch.
 -$version  = 2017120800.01;              // 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.
                                          //           .XX = incremental changes.