From 38fd091a558b57e4aac7061ed3cc368fd66ac916 Mon Sep 17 00:00:00 2001 From: Aaron Wells Date: Thu, 11 Apr 2024 17:24:22 +1200 Subject: [PATCH] MDL-80231 core: cleanup of DB upgrades around ltiservice -> ltixservice Adds a section to update records in the lti_types_config table. --- lib/db/upgrade.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index 51a9c54646db7..3866be6aa70ec 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -1195,6 +1195,11 @@ function xmldb_main_upgrade($oldversion) { if (!file_exists($versionfile)) { uninstall_plugin('ltiservice', $type); } + + // Move all the service-specific type config for ltiservice_xx plugins to ltixservice_xx. + $oldsettingname = 'ltiservice_'.$type; + $newsettingname = 'ltixservice'.$type; + $DB->set_field('lti_types_config', 'name', $newsettingname, ['name' => $oldsettingname]); } // Main savepoint reached.