mod_roomReservationControl.inc needs functions.inc for rrGetCss() and quote.inc for q()
[iserv-mod-room-reservation.git] / sql / mod_room-reservation.sql
1 --
2 -- Table with bookings for module iserv-room-reservation
3 --
4 CREATE TABLE mod_roomreservation_bookings (
5 rrb_uid SERIAL NOT NULL PRIMARY KEY, -- Unique ID
6 rrb_room TEXT NOT NULL -- Name of the room
7 REFERENCES rooms(name)
8 ON DELETE CASCADE
9 ON UPDATE CASCADE,
10 rrb_date DATE NOT NULL, -- Date of the booking
11 rrb_tsfirst SMALLINT NOT NULL, -- Number of the first timeslice
12 rrb_tslast SMALLINT NOT NULL -- Number of the last timeslice
13 CHECK(rrb_tsfirst <= rrb_tslast),
14 rrb_act TEXT NOT NULL -- Owner of the booking
15 REFERENCES users(Act)
16 ON DELETE CASCADE
17 ON UPDATE CASCADE,
18 rrb_reason TEXT NOT NULL, -- Reason
19 rrb_interval SMALLINT NOT NULL -- Interval in weeks for recurring bookings
20 DEFAULT 0
21 );
22
23 --
24 -- Permissions
25 --
26 GRANT SELECT, INSERT, UPDATE, DELETE ON mod_roomreservation_bookings, mod_roomreservation_bookings_rrb_uid_seq TO webusr;
27 GRANT SELECT, INSERT, UPDATE, DELETE ON mod_roomreservation_bookings, mod_roomreservation_bookings_rrb_uid_seq TO webadm;
This page took 0.057883 seconds and 5 git commands to generate.