From b52aa5bb73adeabaf99b3abf74ccf473373017e2 Mon Sep 17 00:00:00 2001 From: Ethan Ho Date: Sat, 10 Feb 2024 02:46:15 -0800 Subject: [PATCH 1/2] Schema for Day table --- server/schema/day.sql | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 server/schema/day.sql diff --git a/server/schema/day.sql b/server/schema/day.sql new file mode 100644 index 0000000..ec696c3 --- /dev/null +++ b/server/schema/day.sql @@ -0,0 +1,9 @@ +DROP TABLE IF EXISTS day; +CREATE TABLE IF NOT EXISTS day ( + id serial PRIMARY KEY, + event_date DATE NOT NULL, + start_time TIMESTAMP NOT NULL, + end_time TIMESTAMP NOT NULL, + location VARCHAR( 256 ) NOT NULL, + notes VARCHAR( 250 ) +); \ No newline at end of file From 50b3ba15bc7e8200dc06ae4f849a7f6df28e94f7 Mon Sep 17 00:00:00 2001 From: Ethan Ho Date: Tue, 13 Feb 2024 13:02:10 -0800 Subject: [PATCH 2/2] updated schema to match db model --- server/schema/day.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/schema/day.sql b/server/schema/day.sql index ec696c3..1ac0b41 100644 --- a/server/schema/day.sql +++ b/server/schema/day.sql @@ -2,8 +2,8 @@ DROP TABLE IF EXISTS day; CREATE TABLE IF NOT EXISTS day ( id serial PRIMARY KEY, event_date DATE NOT NULL, - start_time TIMESTAMP NOT NULL, - end_time TIMESTAMP NOT NULL, + start_time TIME NOT NULL, + end_time TIME NOT NULL, location VARCHAR( 256 ) NOT NULL, notes VARCHAR( 250 ) ); \ No newline at end of file