Skip to content

Commit 9f7ec48

Browse files
committed
rooms migration file
1 parent b183995 commit 9f7ec48

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
-- Create guests table
2+
Create TYPE suite_type_enum AS ENUM ('Single', 'Double', 'Queen', 'King');
3+
4+
CREATE TABLE IF NOT EXISTS public.rooms (
5+
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
6+
room_number INTEGER NOT NULL,
7+
suite_type suite_type_enum NOT NULL,
8+
features TEXT[] DEFAULT '{}',
9+
created_at TIMESTAMPTZ DEFAULT now(),
10+
updated_at TIMESTAMPTZ DEFAULT now()
11+
);
12+
13+
--Enable RLS
14+
ALTER TABLE public.rooms ENABLE ROW LEVEL SECURITY;

0 commit comments

Comments
 (0)