MDL-67883 core: Make core ready for MoodleNet.
[moodle.git] / lib / db / upgrade.php
index d0d822d..b6348d1 100644 (file)
@@ -2427,5 +2427,19 @@ function xmldb_main_upgrade($oldversion) {
         upgrade_main_savepoint(true, 2020052200.01);
     }
 
+    if ($oldversion < 2020060500.01) {
+        // Define field moodlenetprofile to be added to user.
+        $table = new xmldb_table('user');
+        $field = new xmldb_field('moodlenetprofile', XMLDB_TYPE_CHAR, '255', null, null, null, null, 'alternatename');
+
+        // Conditionally launch add field moodlenetprofile.
+        if (!$dbman->field_exists($table, $field)) {
+            $dbman->add_field($table, $field);
+        }
+
+        // Main savepoint reached.
+        upgrade_main_savepoint(true, 2020060500.01);
+    }
+
     return true;
 }