diff options
| author | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2023-12-12 10:51:59 +0000 |
|---|---|---|
| committer | Jan-Hendrik Willms <tleilax+github@gmail.com> | 2023-12-14 12:09:07 +0100 |
| commit | cd4f2f68f06147c68e789ae464dc3fa14567d2b5 (patch) | |
| tree | 52c703126470e2c9fcd070da8d353d6a6d169a76 /db | |
| parent | f00d54a56825840d142ee5903265f6d652f9e4fc (diff) | |
fixes #3550
Closes #3550
Merge request studip/studip!2438
Diffstat (limited to 'db')
| -rw-r--r-- | db/migrations/5.3.22_add_report_barrier_mode_configuration.php | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/db/migrations/5.3.22_add_report_barrier_mode_configuration.php b/db/migrations/5.3.22_add_report_barrier_mode_configuration.php new file mode 100644 index 0000000..8acccd3 --- /dev/null +++ b/db/migrations/5.3.22_add_report_barrier_mode_configuration.php @@ -0,0 +1,31 @@ +<?php +final class AddReportBarrierModeConfiguration extends Migration +{ + public function description() + { + return 'Adds the configuration option REPORT_BARRIER_MODE'; + } + + protected function up() + { + $query = "INSERT IGNORE INTO `config` ( + `field`, `value`, `type`, `range`, + `section`, `description`, + `mkdate`, `chdate` + ) VALUES ( + 'REPORT_BARRIER_MODE', 'on', 'string', 'global', + 'accessibility', 'Einstellungen zum Formular zu Melden einer Barriere (\"on\" = immer an, \"logged-in\" = nur für angemeldete Personen, \"off\" = ausgeschaltet)', + UNIX_TIMESTAMP(), UNIX_TIMESTAMP() + )"; + DBManager::get()->exec($query); + } + + protected function down() + { + $query = "DELETE config, config_values + FROM `config` + LEFT JOIN `config_values` USING(`field`) + WHERE `field` = 'REPORT_BARRIER_MODE'"; + DBManager::get()->exec($query); + } +} |
