Merge branch 'MDL-37624-master' of git://github.com/mickhawkins/moodle
authorJun Pataleta <jun@moodle.com>
Wed, 4 Jul 2018 07:33:43 +0000 (15:33 +0800)
committerJun Pataleta <jun@moodle.com>
Wed, 4 Jul 2018 07:33:43 +0000 (15:33 +0800)
1  2 
calendar/classes/local/event/forms/create.php
calendar/tests/behat/calendar.feature
lib/db/install.xml
lib/db/upgrade.php
version.php

Simple merge
Simple merge
@@@ -2234,25 -2234,18 +2234,39 @@@ function xmldb_main_upgrade($oldversion
      // Put any upgrade step following this.
  
      if ($oldversion < 2018062800.01) {
 -        upgrade_main_savepoint(true, 2018062800.01);
 +        // Add foreign key fk_user to the comments table.
 +        $table = new xmldb_table('comments');
 +        $key = new xmldb_key('fk_user', XMLDB_KEY_FOREIGN, array('userid'), 'user', array('id'));
 +        $dbman->add_key($table, $key);
 +
 +        upgrade_main_savepoint(true, 2018062800.01);
 +    }
 +
 +    if ($oldversion < 2018062800.02) {
 +        // Add composite index ix_concomitem to the table comments.
 +        $table = new xmldb_table('comments');
 +        $index = new xmldb_index('ix_concomitem', XMLDB_INDEX_NOTUNIQUE, array('contextid', 'commentarea', 'itemid'));
 +
 +        if (!$dbman->index_exists($table, $index)) {
 +            $dbman->add_index($table, $index);
 +        }
 +
 +        upgrade_main_savepoint(true, 2018062800.02);
 +    }
 +
++    if ($oldversion < 2018062800.03) {
+         // Define field location to be added to event.
+         $table = new xmldb_table('event');
+         $field = new xmldb_field('location', XMLDB_TYPE_TEXT, null, null, null, null, null, 'priority');
+         // Conditionally launch add field location.
+         if (!$dbman->field_exists($table, $field)) {
+             $dbman->add_field($table, $field);
+         }
+         // Main savepoint reached.
++        upgrade_main_savepoint(true, 2018062800.03);
+     }
      return true;
  }
diff --cc version.php
@@@ -29,7 -29,7 +29,7 @@@
  
  defined('MOODLE_INTERNAL') || die();
  
- $version  = 2018062800.02;              // YYYYMMDD      = weekly release date of this DEV branch.
 -$version  = 2018062800.01;              // YYYYMMDD      = weekly release date of this DEV branch.
++$version  = 2018062800.03;              // YYYYMMDD      = weekly release date of this DEV branch.
                                          //         RR    = release increments - 00 in DEV branches.
                                          //           .XX = incremental changes.