diff options
| author | David Siegfried <david.siegfried@uni-vechta.de> | 2024-03-15 15:40:30 +0000 |
|---|---|---|
| committer | Jan-Hendrik Willms <tleilax+github@gmail.com> | 2024-03-17 12:45:53 +0100 |
| commit | 43e85a9a757d2e17122988944f06d58621b6d2a8 (patch) | |
| tree | 192db4e8b2f6f0c2f85ad3fa4bc0ea15cf1b78f9 /db | |
| parent | fdbb600105fb3e378b29c59d923a3b5705c304e7 (diff) | |
fixes #2735
Closes #2735
Merge request studip/studip!2670
Diffstat (limited to 'db')
| -rw-r--r-- | db/migrations/5.1.54_fix_single_date_logging.php | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/db/migrations/5.1.54_fix_single_date_logging.php b/db/migrations/5.1.54_fix_single_date_logging.php new file mode 100644 index 0000000..d35c20a --- /dev/null +++ b/db/migrations/5.1.54_fix_single_date_logging.php @@ -0,0 +1,24 @@ +<?php + +final class FixSingleDateLogging extends Migration +{ + public function description() + { + return 'Fix broken SingleDate-Logging'; + } + + public function up() + { + DBManager::get()->exec("UPDATE `log_actions` SET `info_template`= '%user hat in %sem(%affected) den Einzeltermin %singledate(%coaffected) geändert.' WHERE `name` = 'SINGLEDATE_CHANGE_TIME'"); + DBManager::get()->exec("UPDATE `log_actions` SET `info_template`= '%user hat in %sem(%affected) den Einzeltermin %singledate(%coaffected) hinzugefügt' WHERE `name` = 'SEM_ADD_SINGLEDATE'"); + + DBManager::get()->exec(" + UPDATE `log_events` + SET `dbg_info` = `info`, `info` = `coaffected_range_id`, `coaffected_range_id` = null + WHERE `action_id` IN ( + SELECT `action_id` FROM `log_actions` WHERE `name` IN ('SINGLEDATE_CHANGE_TIME', 'SEM_ADD_SINGLEDATE') + ) + "); + } + +} |
