diff options
| author | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2024-05-15 09:06:39 +0000 |
|---|---|---|
| committer | Jan-Hendrik Willms <tleilax+github@gmail.com> | 2024-05-15 11:10:07 +0200 |
| commit | 7b7ceed8045c622c6f9f98aaa140e987f2297c03 (patch) | |
| tree | d65d7342346803596840bd0efbd792cd10b1bc3b /db | |
| parent | cc2d80e2a7fadb3d0ec40950bf946b1bbb47e6fd (diff) | |
add missing indices, fixes #4157
Closes #4157
Merge request studip/studip!2997
Diffstat (limited to 'db')
| -rw-r--r-- | db/migrations/5.1.58_add_missing_indices_for_table_schedule_seminare.php | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/db/migrations/5.1.58_add_missing_indices_for_table_schedule_seminare.php b/db/migrations/5.1.58_add_missing_indices_for_table_schedule_seminare.php new file mode 100644 index 0000000..f051f6d --- /dev/null +++ b/db/migrations/5.1.58_add_missing_indices_for_table_schedule_seminare.php @@ -0,0 +1,27 @@ +<?php +/** + * @see https://gitlab.studip.de/studip/studip/-/issues/4157 + */ +return new class extends Migration +{ + public function description() + { + return 'Adds missing indices for columns "seminar_id" and "metadate_id" for table "schedule_seminare"'; + } + + protected function up() + { + $query = "ALTER TABLE `schedule_seminare` + ADD INDEX `seminar_id` (`seminar_id`), + ADD INDEX `metadate_id` (`metadate_id`)"; + DBManager::get()->exec($query); + } + + protected function down() + { + $query = "ALTER TABLE `schedule_seminare` + DROP INDEX `seminar_id`, + DROP INDEX `metadate_id`"; + DBManager::get()->exec($query); + } +}; |
