--\r
--- Table with bookings for module iserv-room-reservation\r
+-- Table with rooms allowed for booking\r
+-- \r
+CREATE TABLE mod_roomreservation_roomswhitelist (\r
+ rrr_name TEXT UNIQUE REFERENCES rooms(name)\r
+ ON DELETE CASCADE\r
+ ON UPDATE CASCADE\r
+);\r
+\r
+--\r
+-- Table with bookings\r
--\r
CREATE TABLE mod_roomreservation_bookings (\r
rrb_uid SERIAL NOT NULL PRIMARY KEY, -- Unique ID \r
--\r
-- Permissions\r
--\r
-GRANT SELECT, INSERT, UPDATE, DELETE ON mod_roomreservation, mod_roomreservation_rr_uid_seq TO webusr;\r
-GRANT SELECT, INSERT, UPDATE, DELETE ON mod_roomreservation, mod_roomreservation_rr_uid_seq TO webadm;\r
+GRANT SELECT, INSERT, UPDATE, DELETE ON mod_roomreservation_bookings, mod_roomreservation_bookings_rrb_uid_seq TO webusr;\r
+GRANT SELECT, INSERT, UPDATE, DELETE ON mod_roomreservation_bookings, mod_roomreservation_bookings_rrb_uid_seq TO webadm;\r
+GRANT SELECT ON mod_roomreservation_roomswhitelist TO webusr;\r
+GRANT SELECT, INSERT, UPDATE, DELETE ON mod_roomreservation_roomswhitelist TO webadm;\r