aboutsummaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorAndré Noack <noack@data-quest.de>2024-02-02 12:42:33 +0000
committerAndré Noack <noack@data-quest.de>2024-02-02 12:42:33 +0000
commitfb47f10e4e0fb350219a70f1b6ae16c83d72b934 (patch)
treede89431913e3e5fcb2f2229c5378f9e3645b4510 /db
parentc79263d70eac66dce4189df797da71ba232935e0 (diff)
Resolve #3193 "Keine unbegrenzten Veranstaltungen mehr in der Kategorie Lehre"
Closes #3193 Merge request studip/studip!2160
Diffstat (limited to 'db')
-rw-r--r--db/migrations/5.5.26_tic3193_no_unlimited_courses.php26
1 files changed, 26 insertions, 0 deletions
diff --git a/db/migrations/5.5.26_tic3193_no_unlimited_courses.php b/db/migrations/5.5.26_tic3193_no_unlimited_courses.php
new file mode 100644
index 0000000..ef45bce
--- /dev/null
+++ b/db/migrations/5.5.26_tic3193_no_unlimited_courses.php
@@ -0,0 +1,26 @@
+<?php
+
+final class Tic3193NoUnlimitedCourses extends Migration
+{
+ public function description()
+ {
+ return 'adds option to forbid unlimited courses';
+ }
+
+ public function up()
+ {
+ DBManager::get()->exec("
+ ALTER TABLE `sem_classes` ADD `unlimited_forbidden` TINYINT UNSIGNED NOT NULL DEFAULT 0 AFTER `is_group`
+ ");
+ $cache = StudipCacheFactory::getCache();
+ $cache->expire('DB_SEM_CLASSES_ARRAY');
+ }
+
+ public function down()
+ {
+ DBManager::get()->exec("ALTER TABLE `sem_classes` DROP `unlimited_forbidden`");
+ $cache = StudipCacheFactory::getCache();
+ $cache->expire('DB_SEM_CLASSES_ARRAY');
+ }
+}
+