MDL-48894 core_registration: make it more obvious if site is registered
[moodle.git] / lib / db / upgrade.php
index 59417d2..d74c4c4 100644 (file)
@@ -4161,5 +4161,21 @@ function xmldb_main_upgrade($oldversion) {
         // Main savepoint reached.
         upgrade_main_savepoint(true, 2015012600.01);
     }
+
+    if ($oldversion < 2015012900.01) {
+
+        // Define field timemodified to be added to registration_hubs.
+        $table = new xmldb_table('registration_hubs');
+        $field = new xmldb_field('timemodified', XMLDB_TYPE_INTEGER, '10', null, null, null, '0', 'secret');
+
+        // Conditionally launch add field timemodified.
+        if (!$dbman->field_exists($table, $field)) {
+            $dbman->add_field($table, $field);
+        }
+
+        // Main savepoint reached.
+        upgrade_main_savepoint(true, 2015012900.01);
+    }
+
     return true;
 }