aboutsummaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorRon Lucke <lucke@elan-ev.de>2023-12-18 12:03:38 +0000
committerRon Lucke <lucke@elan-ev.de>2023-12-18 12:03:38 +0000
commitba52642f0634f211432e877d9dff0d2dec75d806 (patch)
treea8da0636d714b4f29bc00439dc2f17c5fa995618 /db
parente09c643e2ed3719b081ce3ee3b55fb15cbd04274 (diff)
StEP #3255
Merge request studip/studip!2355
Diffstat (limited to 'db')
-rw-r--r--db/migrations/5.5.11_courseware_add_optional_comments.php21
1 files changed, 21 insertions, 0 deletions
diff --git a/db/migrations/5.5.11_courseware_add_optional_comments.php b/db/migrations/5.5.11_courseware_add_optional_comments.php
new file mode 100644
index 0000000..7c12a2e
--- /dev/null
+++ b/db/migrations/5.5.11_courseware_add_optional_comments.php
@@ -0,0 +1,21 @@
+<?php
+
+final class CoursewareAddOptionalComments extends Migration
+{
+ public function description()
+ {
+ return 'Add column commentable to cw_blocks and cw_structural_elements';
+ }
+
+ protected function up()
+ {
+ DBManager::get()->exec("ALTER TABLE `cw_blocks` ADD `commentable` TINYINT(1) NOT NULL AFTER `visible`");
+ DBManager::get()->exec("ALTER TABLE `cw_structural_elements` ADD `commentable` TINYINT(1) NOT NULL AFTER `public`");
+ }
+
+ protected function down()
+ {
+ DBManager::get()->exec("ALTER TABLE `cw_blocks` DROP `commentable`");
+ DBManager::get()->exec("ALTER TABLE `cw_structural_elements` DROP `commentable`");
+ }
+}