aboutsummaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorJan-Hendrik Willms <tleilax+studip@gmail.com>2025-02-17 07:06:50 +0000
committerJan-Hendrik Willms <tleilax+studip@gmail.com>2025-02-17 10:35:53 +0100
commitb92a86a4dbac40bf71602e1e04bab43f8e4f91d2 (patch)
tree671611bcd7668ca96078eb831b130fe4920a3f8e /db
parent00030a8f9d06ac0f506355cdf50c3c5427b18746 (diff)
add migration that acutally does what 5.4.6 should have done, fixes #5129
Closes #5129 Merge request studip/studip!3936
Diffstat (limited to 'db')
-rw-r--r--db/migrations/5.4.19_fix_tree_changes.php20
-rw-r--r--db/migrations/5.4.6_tree_changes.php4
2 files changed, 21 insertions, 3 deletions
diff --git a/db/migrations/5.4.19_fix_tree_changes.php b/db/migrations/5.4.19_fix_tree_changes.php
new file mode 100644
index 0000000..b4631ed
--- /dev/null
+++ b/db/migrations/5.4.19_fix_tree_changes.php
@@ -0,0 +1,20 @@
+<?php
+final class FixTreeChanges extends Migration
+{
+ public function description()
+ {
+ return 'Actually removes the config entries from 5.4.6 that was faulty at first';
+ }
+
+ protected function up()
+ {
+ $query = "DELETE `config`, `config_values`
+ FROM `config`
+ LEFT JOIN `config_values` USING (`field`)
+ WHERE `field` IN (
+ 'RANGE_TREE_ADMIN_PERM',
+ 'SEM_TREE_ADMIN_PERM'
+ )";
+ DBManager::get()->exec($query);
+ }
+}
diff --git a/db/migrations/5.4.6_tree_changes.php b/db/migrations/5.4.6_tree_changes.php
index 03a0ea3..aaef5b5 100644
--- a/db/migrations/5.4.6_tree_changes.php
+++ b/db/migrations/5.4.6_tree_changes.php
@@ -1,8 +1,6 @@
-<?
-
+<?php
final class TreeChanges extends Migration
{
-
const FIELDS = [
'RANGE_TREE_ADMIN_PERM',
'SEM_TREE_ADMIN_PERM'