From d98109b1deae01c30e595b56b93b4978993dfa8b Mon Sep 17 00:00:00 2001 From: Lukas Scharmer Date: Wed, 2 Sep 2026 13:05:42 +0200 Subject: [PATCH] Course: Change col target_group to type text in table crs_settings --- .../ILIAS/Course/Setup/UpdateStepsV12.php | 43 +++++++++++++++++++ .../ILIAS/Course/Setup/ilCourseSetupAgent.php | 9 +++- 2 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 components/ILIAS/Course/Setup/UpdateStepsV12.php diff --git a/components/ILIAS/Course/Setup/UpdateStepsV12.php b/components/ILIAS/Course/Setup/UpdateStepsV12.php new file mode 100644 index 000000000000..0caabb7367f1 --- /dev/null +++ b/components/ILIAS/Course/Setup/UpdateStepsV12.php @@ -0,0 +1,43 @@ +db = $db; + } + + public function step_1(): void + { + $this->db->modifyTableColumn('crs_settings', 'target_group', [ + 'type' => ilDBConstants::T_CLOB, + 'length' => 4000, + ]); + } +} diff --git a/components/ILIAS/Course/Setup/ilCourseSetupAgent.php b/components/ILIAS/Course/Setup/ilCourseSetupAgent.php index d8ba89cc8be9..0f844c7595dc 100644 --- a/components/ILIAS/Course/Setup/ilCourseSetupAgent.php +++ b/components/ILIAS/Course/Setup/ilCourseSetupAgent.php @@ -24,6 +24,8 @@ use ILIAS\Setup\Config; use ILIAS\Setup; use ILIAS\Refinery\Transformation; +use ILIAS\Setup\ObjectiveCollection; +use ILIAS\Course\Setup\UpdateStepsV12; class ilCourseSetupAgent extends NullAgent { @@ -31,7 +33,12 @@ class ilCourseSetupAgent extends NullAgent public function getUpdateObjective(?ILIAS\Setup\Config $config = null): Objective { - return new ilDatabaseUpdateStepsExecutedObjective(new ilCourseDBUpdateSteps()); + return new ObjectiveCollection( + 'Update Course component', + false, + new ilDatabaseUpdateStepsExecutedObjective(new ilCourseDBUpdateSteps()), + new ilDatabaseUpdateStepsExecutedObjective(new UpdateStepsV12()) + ); } public function getStatusObjective(Metrics\Storage $storage): Objective