diff options
| author | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2024-10-29 12:45:30 +0000 |
|---|---|---|
| committer | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2024-10-29 12:45:30 +0000 |
| commit | 0b60240a60a70b26e0bb55eb4f9f333835898a62 (patch) | |
| tree | dd68a6734d15f9935c2c4a542c9b6280c68851f5 /db | |
| parent | 595fe442a7937ec3476553aa87945fc6d98a47f5 (diff) | |
provide migration that removes the invalid entries from folders table, re #4008, fixes #4777
Closes #4777
Merge request studip/studip!3572
Diffstat (limited to 'db')
| -rw-r--r-- | db/migrations/5.3.25_remove_bogus_folders_biest_4008.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/db/migrations/5.3.25_remove_bogus_folders_biest_4008.php b/db/migrations/5.3.25_remove_bogus_folders_biest_4008.php new file mode 100644 index 0000000..14fa348 --- /dev/null +++ b/db/migrations/5.3.25_remove_bogus_folders_biest_4008.php @@ -0,0 +1,18 @@ +<?php +/** + * @see https://gitlab.studip.de/studip/studip/-/issues/4777 + */ +return new class extends Migration +{ + public function description() + { + return 'Removes the invalid entries from folder table (see BIEST#4008)'; + } + + protected function up() + { + $query = "DELETE FROM `folders` + WHERE `folder_type` IN ('course', 'user')"; + DBManager::get()->exec($query); + } +}; |
