MDL-76722 core: Fix upgrade failures with MariaDB

The 'enable' field doesn't exist, and this is causing some failures
with MariaDB (and probably with MySQL too).
This commit is contained in:
Sara Arjona
2023-04-12 11:43:52 +02:00
parent 99e2c31f3a
commit ea2e9d5920
+1 -1
View File
@@ -3218,7 +3218,7 @@ privatefiles,moodle|/user/files.php';
if ($oldversion < 2023041100.00) {
// Add public key field to user_devices table.
$table = new xmldb_table('user_devices');
$field = new xmldb_field('publickey', XMLDB_TYPE_TEXT, null, null, null, null, null, 'enable');
$field = new xmldb_field('publickey', XMLDB_TYPE_TEXT, null, null, null, null, null, 'uuid');
if (!$dbman->field_exists($table, $field)) {
$dbman->add_field($table, $field);