From ba15095f6b1dcd3d8b1d2359a1117061ca51d062 Mon Sep 17 00:00:00 2001 From: Nathan Pietrantonio <78774649+theNatePi@users.noreply.github.com> Date: Tue, 3 Dec 2024 21:11:25 -0800 Subject: [PATCH] Replace rooms with PostgreSQL --- server/db/schema/rooms.sql | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/server/db/schema/rooms.sql b/server/db/schema/rooms.sql index 6e7dbdc..3bb88ae 100644 --- a/server/db/schema/rooms.sql +++ b/server/db/schema/rooms.sql @@ -1,6 +1,8 @@ -CREATE TABLE rooms ( - id INT PRIMARY KEY UNIQUE NOT NULL DEFAULT nextval('room_id_seq'), - name VARCHAR(256) NOT NULL, - description VARCHAR(256), - rate NUMERIC NOT NULL -); \ No newline at end of file +CREATE TABLE IF NOT EXISTS public.rooms +( + id integer NOT NULL GENERATED ALWAYS AS IDENTITY ( INCREMENT 1 START 1 MINVALUE 1 MAXVALUE 2147483647 CACHE 1 ), + name character varying(256) COLLATE pg_catalog."default" NOT NULL, + description character varying(256) COLLATE pg_catalog."default", + rate numeric NOT NULL, + CONSTRAINT room_pkey PRIMARY KEY (id) +)