From 7c843b380bbc06a4c2657c30f7bc010a61e3bca7 Mon Sep 17 00:00:00 2001 From: Alex Morris Date: Thu, 12 Jan 2023 13:36:15 +1300 Subject: [PATCH] MDL-76722 lib/db: Add new publickey field to user_devices table --- lib/db/install.xml | 1 + lib/db/upgrade.php | 13 +++++++++++++ version.php | 2 +- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/lib/db/install.xml b/lib/db/install.xml index 91078df60ed..72576c4c218 100644 --- a/lib/db/install.xml +++ b/lib/db/install.xml @@ -3389,6 +3389,7 @@ + diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index 66b822cc5de..835904aa792 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -3215,5 +3215,18 @@ privatefiles,moodle|/user/files.php'; upgrade_main_savepoint(true, 2023032800.01); } + 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'); + + if (!$dbman->field_exists($table, $field)) { + $dbman->add_field($table, $field); + } + + // Main savepoint reached. + upgrade_main_savepoint(true, 2023041100.00); + } + return true; } diff --git a/version.php b/version.php index 81f9e4d2b2d..a5338390783 100644 --- a/version.php +++ b/version.php @@ -29,7 +29,7 @@ defined('MOODLE_INTERNAL') || die(); -$version = 2023040600.00; // YYYYMMDD = weekly release date of this DEV branch. +$version = 2023041100.00; // YYYYMMDD = weekly release date of this DEV branch. // RR = release increments - 00 in DEV branches. // .XX = incremental changes. $release = '4.2dev+ (Build: 20230406)'; // Human-friendly version name