diff options
| author | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2026-01-12 09:03:37 +0100 |
|---|---|---|
| committer | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2026-01-12 09:03:37 +0100 |
| commit | 8ca78d04f2af9a424a4be077d8e47d004338f489 (patch) | |
| tree | 18d36cb0600ee37067e5e6fc000e4b9b1cec4726 | |
| parent | a5ae15c1b831d5636732c68dbcbd321f04b8ef60 (diff) | |
add migration that converts wiki configs to be range configs, fixes #6153biest-6153
| -rw-r--r-- | db/migrations/5.5.38_fix_wiki_configs.php | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/db/migrations/5.5.38_fix_wiki_configs.php b/db/migrations/5.5.38_fix_wiki_configs.php new file mode 100644 index 0000000..97709fb --- /dev/null +++ b/db/migrations/5.5.38_fix_wiki_configs.php @@ -0,0 +1,27 @@ +<?php +/** + * @see https://gitlab.studip.de/studip/studip/-/issues/6153 + */ +final class FixWikiConfigs extends Migration +{ + public function description() + { + return 'Converts the wiki configurations WIKI_CREATE_PERMISSION and WIKI_RENAME_PERMISSION to range configurations'; + } + + public function up() + { + $query = "UPDATE `config` + SET `range` = 'range' + WHERE `field` IN('WIKI_CREATE_PERMISSION', 'WIKI_RENAME_PERMISSION')"; + DBManager::get()->exec($query); + } + + public function down() + { + $query = "UPDATE `config` + SET `range` = 'course' + WHERE `field` IN('WIKI_CREATE_PERMISSION', 'WIKI_RENAME_PERMISSION')"; + DBManager::get()->exec($query); + } +} |
