You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"id"textPRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
3
+
"user_id"textNOT NULL,
4
+
"code"textNOT NULL
5
+
);
6
+
--> statement-breakpoint
7
+
CREATETABLEIF NOT EXISTS "session" (
8
+
"id"textPRIMARY KEYNOT NULL,
9
+
"user_id"textNOT NULL,
10
+
"expires_at"timestamp with time zoneNOT NULL
11
+
);
12
+
--> statement-breakpoint
13
+
CREATETABLEIF NOT EXISTS "user" (
14
+
"id"textPRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
15
+
"name"textNOT NULL,
16
+
"email"textNOT NULL,
17
+
CONSTRAINT"user_email_unique" UNIQUE("email")
18
+
);
19
+
--> statement-breakpoint
20
+
DO $$ BEGIN
21
+
ALTERTABLE"magic_link" ADD CONSTRAINT"magic_link_user_id_user_id_fk"FOREIGN KEY ("user_id") REFERENCES"public"."user"("id") ON DELETE no action ONUPDATE no action;
22
+
EXCEPTION
23
+
WHEN duplicate_object THEN null;
24
+
END $$;
25
+
--> statement-breakpoint
26
+
DO $$ BEGIN
27
+
ALTERTABLE"session" ADD CONSTRAINT"session_user_id_user_id_fk"FOREIGN KEY ("user_id") REFERENCES"public"."user"("id") ON DELETE no action ONUPDATE no action;
0 commit comments