aboutsummaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorMoritz Strohm <strohm@data-quest.de>2024-09-09 15:33:40 +0000
committerMoritz Strohm <strohm@data-quest.de>2024-09-09 15:33:40 +0000
commite034e414e80feb25b497172d07eeaa7b6486467d (patch)
tree5b5ad9c56fe81e68edbb1f908ccded46068391e4 /db
parent48c69ed3ad2ddcb567dfaef4ab43b5c934611c55 (diff)
add repetition from monday until friday for resource bookings, re #2013
Merge request studip/studip!2539
Diffstat (limited to 'db')
-rw-r--r--db/migrations/6.0.1.1_add_weekdays_to_resource_bookings.php26
1 files changed, 26 insertions, 0 deletions
diff --git a/db/migrations/6.0.1.1_add_weekdays_to_resource_bookings.php b/db/migrations/6.0.1.1_add_weekdays_to_resource_bookings.php
new file mode 100644
index 0000000..049f941
--- /dev/null
+++ b/db/migrations/6.0.1.1_add_weekdays_to_resource_bookings.php
@@ -0,0 +1,26 @@
+<?php
+
+
+class AddWeekdaysToResourceBookings extends Migration
+{
+ public function description()
+ {
+ return 'Adds the weekdays column to the resource_bookings table.';
+ }
+
+ protected function up()
+ {
+ DBManager::get()->exec(
+ "ALTER TABLE `resource_bookings`
+ ADD COLUMN weekdays VARCHAR(7) COLLATE `latin1_bin` NOT NULL DEFAULT ''"
+ );
+ }
+
+ protected function down()
+ {
+ DBManager::get()->exec(
+ "ALTER TABLE `resource_bookings`
+ DROP COLUMN weekdays"
+ );
+ }
+}