diff options
| author | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2022-11-15 13:12:49 +0000 |
|---|---|---|
| committer | David Siegfried <david.siegfried@uni-vechta.de> | 2022-11-15 13:12:49 +0000 |
| commit | 05cf41b84ab6f664db4f1ee7f27c675ea6235776 (patch) | |
| tree | 129d872ef4c07ad1c7cfbc22619fc3e59eb15147 /db | |
| parent | de69b6fdcb19deb5cbbfaec3e3a87f923ea6f762 (diff) | |
lock times for consultation blocks, fixes #1264
Closes #1264
Merge request studip/studip!785
Diffstat (limited to 'db')
| -rw-r--r-- | db/migrations/5.3.6_add_consultation_lock_time.php | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/db/migrations/5.3.6_add_consultation_lock_time.php b/db/migrations/5.3.6_add_consultation_lock_time.php new file mode 100644 index 0000000..0eba290 --- /dev/null +++ b/db/migrations/5.3.6_add_consultation_lock_time.php @@ -0,0 +1,23 @@ +<?php +final class AddConsultationLockTime extends Migration +{ + public function description() + { + return 'Adds a lock time for consultation blocks that prevents slots ' + . 'from being booked based on the current time.'; + } + + protected function up() + { + $query = "ALTER TABLE `consultation_blocks` + ADD COLUMN `lock_time` INT(11) UNSIGNED DEFAULT NULL AFTER `size`"; + DBManager::get()->exec($query); + } + + protected function down() + { + $query = "ALTER TABLE `consultation_blocks` + DROP COLUMN `lock_time`"; + DBManager::get()->exec($query); + } +} |
