From 719d4fdee7609c6b7bc6d6d9d020e3acb8b7aa5b Mon Sep 17 00:00:00 2001 From: Murtaza Sultani Date: Fri, 20 Mar 2026 10:38:28 +0100 Subject: Data Migration Script --- db/migrations/6.3.1_step_5405.php | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/db/migrations/6.3.1_step_5405.php b/db/migrations/6.3.1_step_5405.php index 039566d..960c223 100644 --- a/db/migrations/6.3.1_step_5405.php +++ b/db/migrations/6.3.1_step_5405.php @@ -158,7 +158,15 @@ final class Step5405 extends Migration { "); DBManager::get()->exec(" - ALTER TABLE `lti_resource_links` ADD COLUMN `custom_parameters` TEXT AFTER `options` + ALTER TABLE `lti_resource_links` ADD COLUMN `custom_parameters` TEXT AFTER `launch_url` + "); + + DBManager::get()->exec(" + ALTER TABLE `lti_resource_links` MODIFY `mkdate` INT UNSIGNED DEFAULT NULL AFTER `custom_parameters` + "); + + DBManager::get()->exec(" + ALTER TABLE `lti_resource_links` MODIFY `chdate` INT UNSIGNED DEFAULT NULL AFTER `mkdate` "); DBManager::get()->exec(" @@ -319,6 +327,29 @@ final class Step5405 extends Migration { } } + $db->exec(" + UPDATE `lti_registrations` SET `status` = 'active' + "); + + $db->exec(" + UPDATE `lti_deployments` SET `is_default`= 1, `deployment_key` = `id`, `client_id` = `registration_id` + "); + + $db->exec(" + DELETE FROM lti_deployments WHERE purpose = 'deep_linking' + "); + + $db->prepare(" + DELETE FROM `lti_resource_links` WHERE `options` = :options + ") + ->execute([ + 'options' => '{"unfinished_deep_linking":"true"}' + ]); + + $db->exec(" + ALTER TABLE `lti_resource_links` DROP COLUMN `options` + "); + $columnsToRemove = [ 'launch_url', 'jwks_url', -- cgit v1.0