From da5ab26fec2e9634a13a3b7b5eeeba81a90ca844 Mon Sep 17 00:00:00 2001 From: Jan-Hendrik Willms <tleilax+studip@gmail.com> Date: Wed, 31 May 2023 13:35:20 +0000 Subject: [PATCH] add migration that adds the missing default translation for CONSULTATION_TAB_TITLE, fixes #2690 Closes #2690 Merge request studip/studip!1819 --- ...add_consultation_tab_title_translation.php | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 db/migrations/5.1.47_add_consultation_tab_title_translation.php diff --git a/db/migrations/5.1.47_add_consultation_tab_title_translation.php b/db/migrations/5.1.47_add_consultation_tab_title_translation.php new file mode 100644 index 00000000000..3e694571954 --- /dev/null +++ b/db/migrations/5.1.47_add_consultation_tab_title_translation.php @@ -0,0 +1,26 @@ +<?php +final class AddConsultationTabTitleTranslation extends Migration +{ + public function description() + { + return 'Adds the missing default translation for configuration CONSULTATION_TAB_TITLE'; + } + + protected function up() + { + $query = "INSERT IGNORE INTO `i18n` (`object_id`, `table`, `field`, `lang`, `value`) + VALUES (MD5('CONSULTATION_TAB_TITLE'), 'config', 'value', 'en_GB', 'Date allocation')"; + DBManager::get()->exec($query); + } + + protected function down() + { + $query = "DELETE FROM `i18n` + WHERE `object_id` = MD5('CONSULTATION_TAB_TITLE') + AND `table` = 'config' + AND `field` = 'value' + AND `lang` = 'en_GB' + AND `value` = 'Date allocation'"; + DBManager::get()->exec($query); + } +} -- GitLab