From fbf34b5f04036d946f28697cf0c00eab9626039b Mon Sep 17 00:00:00 2001 From: sgorti1 Date: Sat, 23 Nov 2024 16:00:01 -0800 Subject: [PATCH 1/2] completed the create statements for the bookings table --- server/db/schema/bookings.sql | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 server/db/schema/bookings.sql diff --git a/server/db/schema/bookings.sql b/server/db/schema/bookings.sql new file mode 100644 index 0000000..e69de29 From 01dfc0828413ce55b00beab649a3c884ad67e99d Mon Sep 17 00:00:00 2001 From: sgorti1 Date: Sun, 24 Nov 2024 13:41:33 -0800 Subject: [PATCH 2/2] created booking --- server/db/schema/bookings.sql | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/server/db/schema/bookings.sql b/server/db/schema/bookings.sql index e69de29..c1eed0e 100644 --- a/server/db/schema/bookings.sql +++ b/server/db/schema/bookings.sql @@ -0,0 +1,10 @@ +CREATE TABLE bookings ( + id INT PRIMARY KEY UNIQUE NOT NULL DEFAULT nextval('booking_id_seq'), + event_id INT REFERENCES events(id), + room_id INT REFERENCES rooms(id), + start_time TIME WITH TIME ZONE NOT NULL, + end_time TIME WITH TIME ZONE NOT NULL, + date DATE NOT NULL, + archived BOOL NOT NULL DEFAULT false + +); \ No newline at end of file