aboutsummaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorJan-Hendrik Willms <tleilax+studip@gmail.com>2023-11-13 14:17:58 +0000
committerJan-Hendrik Willms <tleilax+studip@gmail.com>2023-11-13 14:17:58 +0000
commit9ba053ad773f4ed015ab565b3c5129d8e7f80c89 (patch)
tree36bf2d70a5a81c6d301a403b791134e50dfd87be /db
parentdb3efb24b2e3b67e19c4e8799279d68acdb585f2 (diff)
fixes #3435
Closes #3435 Merge request studip/studip!2343
Diffstat (limited to 'db')
-rw-r--r--db/migrations/5.5.7_add_tutor_mailing_option_to_consultation_blocks.php29
1 files changed, 29 insertions, 0 deletions
diff --git a/db/migrations/5.5.7_add_tutor_mailing_option_to_consultation_blocks.php b/db/migrations/5.5.7_add_tutor_mailing_option_to_consultation_blocks.php
new file mode 100644
index 0000000..3a2de1e
--- /dev/null
+++ b/db/migrations/5.5.7_add_tutor_mailing_option_to_consultation_blocks.php
@@ -0,0 +1,29 @@
+<?php
+
+/**
+ * @author Jan-Hendrik Willms <tleilax+studip@gmail.com>
+ * @license GPL2 or any later version
+ * @see https://gitlab.studip.de/studip/studip/-/issues/3435
+ */
+final class AddTutorMailingOptionToConsultationBlocks extends Migration
+{
+ public function description()
+ {
+ return 'Adds the flag "mail_to_tutors" to table "consultation_blocks"';
+ }
+
+ protected function up()
+ {
+ $query = "ALTER TABLE `consultation_blocks`
+ ADD COLUMN `mail_to_tutors` TINYINT(1) UNSIGNED NOT NULL DEFAULT 1 AFTER `require_reason`";
+ DBManager::get()->exec($query);
+ }
+
+ protected function down()
+ {
+ $query = "ALTER TABLE `consultation_blocks`
+ DROP COLUMN `mail_to_tutors`";
+ DBManager::get()->exec($query);
+ }
+
+}