diff options
| author | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2025-10-16 16:30:11 +0200 |
|---|---|---|
| committer | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2025-10-16 16:30:22 +0200 |
| commit | f3ed46d8f20b9fa1f39b065a63d322f197583030 (patch) | |
| tree | fbc855f8074d11fd25709599b86fb28c245d771f /db/migrations | |
| parent | 14f555e40afe803558c1a1ccf81aeb4e135f1274 (diff) | |
add missing migration, re #5957
Diffstat (limited to 'db/migrations')
| -rw-r--r-- | db/migrations/5.4.20_add_configuration_to_always_show_sem_number_on_my_courses.php | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/db/migrations/5.4.20_add_configuration_to_always_show_sem_number_on_my_courses.php b/db/migrations/5.4.20_add_configuration_to_always_show_sem_number_on_my_courses.php new file mode 100644 index 0000000..24120c7 --- /dev/null +++ b/db/migrations/5.4.20_add_configuration_to_always_show_sem_number_on_my_courses.php @@ -0,0 +1,31 @@ +<?php +final class AddConfigurationToAlwaysShowSemNumberOnMyCourses extends Migration +{ + public function description() + { + return 'Adds configuration MY_COURSES_ALWAYS_SHOW_SEMNUM'; + } + + protected function up() + { + $query = "INSERT IGNORE INTO `config` ( + `field`, `value`, `type`, `range`, + `section`, `description`, + `mkdate`, `chdate` + ) VALUES ( + 'MY_COURSES_ALWAYS_SHOW_SEMNUM', 0, 'boolean', 'global', + 'MeineVeranstaltungen', 'Zeigt die Veranstaltungsnummer immer auf \"Meine Veranstaltungen\" an', + 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` = 'MY_COURSES_ALWAYS_SHOW_SEMNUM'"; + DBManager::get()->exec($query); + } +} |
