Merge branch 'wip-MDL-53492-master' of git://github.com/marinaglancy/moodle
[moodle.git] / lib / db / upgrade.php
index 0c7b5f6..575f04e 100644 (file)
@@ -2214,7 +2214,20 @@ function xmldb_main_upgrade($oldversion) {
         upgrade_main_savepoint(true, 2017072000.02);
     }
 
-    if ($oldversion < 2017072701.00) {
+<<<<<<< HEAD
+    if ($oldversion < 2017072700.01) {
+        // Changing nullability of field email on table oauth2_system_account to null.
+        $table = new xmldb_table('oauth2_system_account');
+        $field = new xmldb_field('email', XMLDB_TYPE_TEXT, null, null, null, null, null, 'grantedscopes');
+
+        // Launch change of nullability for field email.
+        $dbman->change_field_notnull($table, $field);
+
+        // Main savepoint reached.
+        upgrade_main_savepoint(true, 2017072700.01);
+    }
+
+    if ($oldversion < 2017072700.02) {
 
         // If the site was previously registered with http://hub.moodle.org change the registration to
         // point to https://moodle.net - this is the correct hub address using https protocol.
@@ -2240,7 +2253,7 @@ function xmldb_main_upgrade($oldversion) {
         $DB->execute('UPDATE {course_published} SET huburl = ? WHERE huburl = ?', [$newhuburl, $oldhuburl]);
 
         // Main savepoint reached.
-        upgrade_main_savepoint(true, 2017072701.00);
+        upgrade_main_savepoint(true, 2017072700.02);
     }
 
     return true;