diff options
| author | Arne Schröder, M. A. <schroeder@data-quest.de> | 2025-07-04 11:32:39 +0000 |
|---|---|---|
| committer | Rasmus Fuhse <fuhse@data-quest.de> | 2025-07-04 11:32:39 +0000 |
| commit | 382cfd5bbe19abd89805ab48287e0c8d425ac080 (patch) | |
| tree | cd84751573663e71469f5cd1870badd8634afd6c /db/migrations | |
| parent | d98e8f811ee969fc94f922a70ad270ff02d057fc (diff) | |
Resolve "Erweiterung und Optimierung der von der ILIAS-Schnittstelle angelegten Strukturkategorien"
Closes #4270
Merge request studip/studip!4215
Diffstat (limited to 'db/migrations')
| -rw-r--r-- | db/migrations/6.1.7_step_4270.php | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/db/migrations/6.1.7_step_4270.php b/db/migrations/6.1.7_step_4270.php new file mode 100644 index 0000000..7178d5b --- /dev/null +++ b/db/migrations/6.1.7_step_4270.php @@ -0,0 +1,43 @@ +<?php + +/** + * Adds namespace values to UserFilter database entries that already existed pre-6.0. + */ +final class Step4270 extends Migration +{ + + public function description() + { + return 'Add additional field to table object_contentmodules'; + } + + public function up() + { + DBManager::get()->execute( + "ALTER TABLE `object_contentmodules` + ADD `object_type` VARCHAR(32) NOT NULL DEFAULT '' AFTER `module_type`, + ADD `object_parent_id` VARCHAR(32) NOT NULL DEFAULT '' AFTER `object_type`, + ADD `object_parent_type` VARCHAR(32) NOT NULL DEFAULT '' AFTER `object_parent_id`" + ); + DBManager::get()->execute( + "ALTER TABLE `object_contentmodules` + DROP PRIMARY KEY, + ADD PRIMARY KEY (`object_id`, `module_id`, `system_type`, `object_parent_id`)" + ); + } + + public function down() + { + DBManager::get()->execute( + "ALTER TABLE `object_contentmodules` + DROP PRIMARY KEY, + ADD PRIMARY KEY (`object_id`, `module_id`, `system_type`)" + ); + DBManager::get()->execute( + "ALTER TABLE `object_contentmodules` + DROP `object_type`, + DROP `object_parent_id`, + DROP `object_parent_type`;" + ); + } +} |
