aboutsummaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorDavid Siegfried <david.siegfried@uni-vechta.de>2024-12-04 11:01:16 +0000
committerDavid Siegfried <david.siegfried@uni-vechta.de>2024-12-04 11:01:16 +0000
commite7f6d667e1b428bf452f34b96336552aaa7df4dc (patch)
tree58ad79c8243e2de1cf75ad494d7e86b5d56ea2a5 /db
parent5e01759061ca0d8a2d95d3d974bb80472d529198 (diff)
Revert "Resolve "Sprachauswahl für Originalfassung der Modul(teil)-Deskriptoren""
Merge request studip/studip!3715
Diffstat (limited to 'db')
-rw-r--r--db/migrations/6.0.36_step_4261.php50
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);
- }
-}