diff options
| author | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2024-12-05 13:34:18 +0100 |
|---|---|---|
| committer | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2024-12-05 13:34:30 +0100 |
| commit | 3883474e337e6d019f69a15ddd3227f337e270c0 (patch) | |
| tree | d8cf6f2294b3fd03383d0d9d4b3d5eacf1222f8d /db | |
| parent | f982cc1e3d2ca0d269dd19f5f421734a94d3468e (diff) | |
Revert "Resolve "Sprachauswahl für Originalfassung der Modul(teil)-Deskriptoren", fixes #4261"
This reverts commit fcc7482d7d002ae4dcfd095d68ed25d68d0e0adc.
Diffstat (limited to 'db')
| -rw-r--r-- | db/migrations/6.0.36_step_4261.php | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/db/migrations/6.0.36_step_4261.php b/db/migrations/6.0.36_step_4261.php deleted file mode 100644 index 0e5fe39..0000000 --- a/db/migrations/6.0.36_step_4261.php +++ /dev/null @@ -1,50 +0,0 @@ -<?php - -final class Step4261 extends Migration -{ - public function description() - { - return 'Add field to module table to store original language.'; - } - - protected function up() - { - $db = DBManager::get(); - - // retrieve default language from config - $config_language = $db->fetchColumn( - "SELECT `value` FROM `config` WHERE `field` = 'DEFAULT_LANGUAGE'" - ); - $default_language = $config_language ?? array_keys($GLOBALS['CONTENT_LANGUAGES'])[0] ?? 'de_DE'; - $db->execute( - 'ALTER TABLE `mvv_modul` - ADD `original_language` VARCHAR(10) NOT NULL DEFAULT ? COLLATE latin1_bin AFTER `verantwortlich`', - [$default_language] - ); - - $query = "INSERT INTO `config` (`field`, `value`, `type`, `range`, `section`, `mkdate`, `chdate`, `description`) - VALUES ('MVV_DEFAULT_LANGUAGE', ?, 'string', 'global', 'mvv', UNIX_TIMESTAMP(), UNIX_TIMESTAMP(), ?)"; - $db->execute($query, - [ - $default_language, - 'Code der Inhalts-Sprache, die als Original-Sprache der Deskriptoren für Module und Modulteile vorausgewählt ist.', - ] - ); - } - - protected function down() - { - $db = DBManager::get(); - - $db->exec( - "ALTER TABLE `mvv_modul` - DROP COLUMN `original_language`" - ); - - $query = "DELETE `config`, `config_values` - FROM `config` - LEFT JOIN `config_values` USING (`field`) - WHERE `field` = 'MVV_DEFAULT_LANGUAGE'"; - $db->exec($query); - } -} |
