2 -- Table with rooms allowed for booking
4 CREATE TABLE mod_roomreservation_roomswhitelist (
5 rrr_name
TEXT UNIQUE REFERENCES rooms(name)
11 -- Table with bookings
13 CREATE TABLE mod_roomreservation_bookings (
14 rrb_uid SERIAL
NOT NULL PRIMARY KEY, -- Unique ID
15 rrb_room
TEXT NOT NULL -- Name of the room
16 REFERENCES rooms(name)
19 rrb_date
DATE NOT NULL, -- Date of the booking
20 rrb_tsfirst
SMALLINT NOT NULL, -- Number of the first timeslice
21 rrb_tslast
SMALLINT NOT NULL -- Number of the last timeslice
22 CHECK(rrb_tsfirst
<= rrb_tslast
),
23 rrb_act
TEXT NOT NULL -- Owner of the booking
27 rrb_reason
TEXT NOT NULL, -- Reason
28 rrb_interval
SMALLINT NOT NULL -- Interval in weeks for recurring
36 GRANT SELECT, INSERT, UPDATE, DELETE ON mod_roomreservation_bookings
TO webusr
,
38 GRANT SELECT, UPDATE ON mod_roomreservation_bookings_rrb_uid_seq
TO webusr
,
40 GRANT SELECT ON mod_roomreservation_roomswhitelist
TO webusr
;
41 GRANT SELECT, INSERT, UPDATE, DELETE ON mod_roomreservation_roomswhitelist
TO