diff options
| author | David Siegfried <david.siegfried@uni-vechta.de> | 2023-04-04 08:44:05 +0000 |
|---|---|---|
| committer | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2023-04-04 08:44:05 +0000 |
| commit | f228e970664e666acd88bc60243f460147b14d46 (patch) | |
| tree | 1c508e9c57fdcef88bc18a716591334faeedb152 /db | |
| parent | ccabee1bf04881fe9f847cfb33691d9a7b757065 (diff) | |
remove description fields from semester_data and termine, closes #2483
Closes #2483
Merge request studip/studip!1675
Diffstat (limited to 'db')
| -rw-r--r-- | db/migrations/5.4.2_remove_description_fields.php | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/db/migrations/5.4.2_remove_description_fields.php b/db/migrations/5.4.2_remove_description_fields.php new file mode 100644 index 0000000..1723778 --- /dev/null +++ b/db/migrations/5.4.2_remove_description_fields.php @@ -0,0 +1,34 @@ +<?php +final class RemoveDescriptionFields extends Migration +{ + public function description() + { + return 'Removes the unused database columns `termine`.`description`, `ex_termine`.`description` and `semester_data`.`description`'; + } + + protected function up() + { + $query = "ALTER TABLE `termine` + DROP COLUMN `description`"; + DBManager::get()->exec($query); + $query = "ALTER TABLE `ex_termine` + DROP COLUMN `description`"; + DBManager::get()->exec($query); + $query = "ALTER TABLE `semester_data` + DROP COLUMN `description`"; + DBManager::get()->exec($query); + } + + protected function down() + { + $query = "ALTER TABLE `termine` + ADD COLUMN `description` TEXT AFTER `content`"; + DBManager::get()->exec($query); + $query = "ALTER TABLE `ex_termine` + ADD COLUMN `description` TEXT AFTER `content`"; + DBManager::get()->exec($query); + $query = "ALTER TABLE `semester_data` + ADD COLUMN `description` TEXT NOT NULL AFTER `name`"; + DBManager::get()->exec($query); + } +} |
