aboutsummaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorJan-Hendrik Willms <tleilax+studip@gmail.com>2024-05-21 08:45:14 +0000
committerJan-Hendrik Willms <tleilax+studip@gmail.com>2024-05-21 08:45:14 +0000
commitc0aade671ebcf6afe6c918e1d2192fe5cf4cb32c (patch)
treeb31567cd5e33fd9ede3690f67f26c6207beef945 /db
parente986fe03b58ae15f0ba307ed6c673f3eda402f00 (diff)
fixes #4196
Closes #4196 Merge request studip/studip!3027
Diffstat (limited to 'db')
-rw-r--r--db/migrations/6.0.6_adjust_default_cache_name.php27
1 files changed, 27 insertions, 0 deletions
diff --git a/db/migrations/6.0.6_adjust_default_cache_name.php b/db/migrations/6.0.6_adjust_default_cache_name.php
new file mode 100644
index 0000000..ea71f35
--- /dev/null
+++ b/db/migrations/6.0.6_adjust_default_cache_name.php
@@ -0,0 +1,27 @@
+<?php
+/**
+ * @see https://gitlab.studip.de/studip/studip/-/issues/4196
+ */
+return new class extends Migration
+{
+ public function description()
+ {
+ return 'Adjust the default cache in table "config" as well"';
+ }
+
+ protected function up()
+ {
+ $query = "UPDATE `config`
+ SET `value` = JSON_REPLACE(`value`, '$.type', ?)
+ WHERE `field` = 'SYSTEMCACHE'";
+ DBManager::get()->execute($query, [Studip\Cache\DbCache::class]);
+ }
+
+ protected function down()
+ {
+ $query = "UPDATE `config`
+ SET `value` = JSON_REPLACE(`value`, '$.type', ?)
+ WHERE `field` = 'SYSTEMCACHE'";
+ DBManager::get()->execute($query, [StudipDbCache::class]);
+ }
+};