diff options
| author | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2025-06-18 12:54:33 +0200 |
|---|---|---|
| committer | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2025-06-20 15:46:55 +0200 |
| commit | 878894ab45b1dca326d62b7e5ae1f79fc83f6e0e (patch) | |
| tree | 368e2cf9304b8146c57da2400cb64d287d62b206 /db | |
| parent | 01566b2cf9ffdc7c79911f24b94b509468568534 (diff) | |
add migration that removes configuration WIKI_COURSE_EDIT_RESTRICTED, fixes #5342
Closes #5342
Merge request studip/studip!4010
Diffstat (limited to 'db')
| -rw-r--r-- | db/migrations/5.5.31_remove_wiki_course_edit_restriction_configuration.php | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/db/migrations/5.5.31_remove_wiki_course_edit_restriction_configuration.php b/db/migrations/5.5.31_remove_wiki_course_edit_restriction_configuration.php new file mode 100644 index 0000000..59d12bd --- /dev/null +++ b/db/migrations/5.5.31_remove_wiki_course_edit_restriction_configuration.php @@ -0,0 +1,30 @@ +<?php +final class RemoveWikiCourseEditRestrictionConfiguration extends Migration +{ + public function description() + { + return 'Removes configuration "WIKI_COURSE_EDIT_RESTRICTED"'; + } + + public function up() + { + $query = "DELETE `config`, `config_values` + FROM `config` + LEFT JOIN `config_values` USING (`field`) + WHERE `field` = 'WIKI_COURSE_EDIT_RESTRICTED'"; + DBManager::get()->exec($query); + } + + public function down() + { + $query = "INSERT INTO `config` (`field`, `value`, `type`, `range`, `mkdate`, `chdate`, `description`) + VALUES (:name, :value, :type, :range, UNIX_TIMESTAMP(), UNIX_TIMESTAMP(), :description)"; + DBManager::get()->execute($query, [ + 'name' => 'WIKI_COURSE_EDIT_RESTRICTED', + 'description' => 'Legt fest, dass nur Teilnehmende ab Rechtestufe "tutor" das Wiki bearbeiten dürfen.', + 'range' => 'course', + 'type' => 'boolean', + 'value' => '0' + ]); + } +} |
