X-Git-Url: https://git.rohieb.name/iserv-mod-room-reservation.git/blobdiff_plain/5760b2a8d146d7c186daab1743c84683d0d84cea..5a9c429536bed77958a77906b5395aadae0ef6e4:/sql/mod_room-reservation.sql

diff --git a/sql/mod_room-reservation.sql b/sql/mod_room-reservation.sql
old mode 100755
new mode 100644
index 7afffef..b6bfd65
--- a/sql/mod_room-reservation.sql
+++ b/sql/mod_room-reservation.sql
@@ -1,5 +1,14 @@
 --
--- Table with bookings for module iserv-room-reservation
+-- Table with rooms allowed for booking
+-- 
+CREATE TABLE mod_roomreservation_roomswhitelist (
+		rrr_name			 TEXT			 UNIQUE REFERENCES rooms(name)
+                             ON DELETE CASCADE
+                             ON UPDATE CASCADE
+);
+
+--
+-- Table with bookings
 --
 CREATE TABLE mod_roomreservation_bookings (
     rrb_uid        SERIAL    NOT NULL PRIMARY KEY, -- Unique ID 
@@ -23,5 +32,7 @@ CREATE TABLE mod_roomreservation_bookings (
 --
 -- Permissions
 --
-GRANT SELECT, INSERT, UPDATE, DELETE ON mod_roomreservation, mod_roomreservation_rr_uid_seq TO webusr;
-GRANT SELECT, INSERT, UPDATE, DELETE ON mod_roomreservation, mod_roomreservation_rr_uid_seq TO webadm;
+GRANT SELECT, INSERT, UPDATE, DELETE ON mod_roomreservation_bookings, mod_roomreservation_bookings_rrb_uid_seq TO webusr;
+GRANT SELECT, INSERT, UPDATE, DELETE ON mod_roomreservation_bookings, mod_roomreservation_bookings_rrb_uid_seq TO webadm;
+GRANT SELECT ON mod_roomreservation_roomswhitelist TO webusr;
+GRANT SELECT, INSERT, UPDATE, DELETE ON mod_roomreservation_roomswhitelist TO webadm;
