Merge branch 'MDL-46282-master' of git://github.com/andrewnicols/moodle
authorSam Hemelryk <sam@moodle.com>
Tue, 30 Sep 2014 19:57:37 +0000 (08:57 +1300)
committerSam Hemelryk <sam@moodle.com>
Tue, 30 Sep 2014 19:57:37 +0000 (08:57 +1300)
Conflicts:
version.php

1  2 
lib/db/upgrade.php
version.php

@@@ -3790,5 -3790,52 +3790,52 @@@ function xmldb_main_upgrade($oldversion
          upgrade_main_savepoint(true, 2014082900.02);
      }
  
 -    if ($oldversion < 2014092500.01) {
++    if ($oldversion < 2014100100.00) {
+         // Define table messageinbound_handlers to be created.
+         $table = new xmldb_table('messageinbound_handlers');
+         // Adding fields to table messageinbound_handlers.
+         $table->add_field('id', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, XMLDB_SEQUENCE, null);
+         $table->add_field('component', XMLDB_TYPE_CHAR, '100', null, XMLDB_NOTNULL, null, null);
+         $table->add_field('classname', XMLDB_TYPE_CHAR, '255', null, XMLDB_NOTNULL, null, null);
+         $table->add_field('defaultexpiration', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, null, '86400');
+         $table->add_field('validateaddress', XMLDB_TYPE_INTEGER, '1', null, XMLDB_NOTNULL, null, '1');
+         $table->add_field('enabled', XMLDB_TYPE_INTEGER, '1', null, XMLDB_NOTNULL, null, '0');
+         // Adding keys to table messageinbound_handlers.
+         $table->add_key('primary', XMLDB_KEY_PRIMARY, array('id'));
+         $table->add_key('classname', XMLDB_KEY_UNIQUE, array('classname'));
+         // Conditionally launch create table for messageinbound_handlers.
+         if (!$dbman->table_exists($table)) {
+             $dbman->create_table($table);
+         }
+         // Define table messageinbound_datakeys to be created.
+         $table = new xmldb_table('messageinbound_datakeys');
+         // Adding fields to table messageinbound_datakeys.
+         $table->add_field('id', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, XMLDB_SEQUENCE, null);
+         $table->add_field('handler', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, null, null);
+         $table->add_field('datavalue', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, null, null);
+         $table->add_field('datakey', XMLDB_TYPE_CHAR, '64', null, null, null, null);
+         $table->add_field('timecreated', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, null, null);
+         $table->add_field('expires', XMLDB_TYPE_INTEGER, '10', null, null, null, null);
+         // Adding keys to table messageinbound_datakeys.
+         $table->add_key('primary', XMLDB_KEY_PRIMARY, array('id'));
+         $table->add_key('handler_datavalue', XMLDB_KEY_UNIQUE, array('handler', 'datavalue'));
+         $table->add_key('handler', XMLDB_KEY_FOREIGN, array('handler'), 'messageinbound_handlers', array('id'));
+         // Conditionally launch create table for messageinbound_datakeys.
+         if (!$dbman->table_exists($table)) {
+             $dbman->create_table($table);
+         }
+         // Main savepoint reached.
 -        upgrade_main_savepoint(true, 2014092500.01);
++        upgrade_main_savepoint(true, 2014100100.00);
+     }
      return true;
  }
diff --cc version.php
@@@ -29,7 -29,7 +29,7 @@@
  
  defined('MOODLE_INTERNAL') || die();
  
- $version  = 2014093001.00;              // YYYYMMDD      = weekly release date of this DEV branch.
 -$version  = 2014092500.01;              // YYYYMMDD      = weekly release date of this DEV branch.
++$version  = 2014100100.00;              // YYYYMMDD      = weekly release date of this DEV branch.
                                          //         RR    = release increments - 00 in DEV branches.
                                          //           .XX = incremental changes.