Skip to content

Commit 29108cd

Browse files
authored
add user settings migration (#1917)
1 parent 50b3808 commit 29108cd

File tree

3 files changed

+576
-0
lines changed

3 files changed

+576
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
CREATE TABLE "user_settings" (
2+
"id" uuid PRIMARY KEY NOT NULL,
3+
"user_id" uuid NOT NULL,
4+
"auto_apply_code" boolean DEFAULT true NOT NULL,
5+
"expand_code_blocks" boolean DEFAULT true NOT NULL,
6+
"show_suggestions" boolean DEFAULT true NOT NULL,
7+
"show_mini_chat" boolean DEFAULT true NOT NULL,
8+
CONSTRAINT "user_settings_user_id_unique" UNIQUE("user_id")
9+
);
10+
--> statement-breakpoint
11+
ALTER TABLE "user_settings" ENABLE ROW LEVEL SECURITY;--> statement-breakpoint
12+
ALTER TABLE "user_settings" ADD CONSTRAINT "user_settings_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE cascade;

0 commit comments

Comments
 (0)