Merge branch 'MDL-50723-master' of git://github.com/andrewnicols/moodle
[moodle.git] / lib / db / upgrade.php
index a3e1885..9dcce10 100644 (file)
@@ -4441,7 +4441,22 @@ function xmldb_main_upgrade($oldversion) {
         upgrade_main_savepoint(true, 2015062500.01);
     }
 
-    if ($oldversion < 2015081400.00) {
+    if ($oldversion < 2015081300.01) {
+
+        // Define field importtype to be added to grade_import_values.
+        $table = new xmldb_table('grade_import_values');
+        $field = new xmldb_field('importonlyfeedback', XMLDB_TYPE_INTEGER, '1', null, null, null, '0', 'importer');
+
+        // Conditionally launch add field importtype.
+        if (!$dbman->field_exists($table, $field)) {
+            $dbman->add_field($table, $field);
+        }
+
+        // Main savepoint reached.
+        upgrade_main_savepoint(true, 2015081300.01);
+    }
+
+    if ($oldversion < 2015082400.00) {
 
         // Define table webdav_locks to be dropped.
         $table = new xmldb_table('webdav_locks');
@@ -4452,7 +4467,7 @@ function xmldb_main_upgrade($oldversion) {
         }
 
         // Main savepoint reached.
-        upgrade_main_savepoint(true, 2015081400.00);
+        upgrade_main_savepoint(true, 2015082400.00);
     }
 
     return true;