notification added in with subs :D
This commit is contained in:
10
migrations/0018_lowly_wallow.sql
Normal file
10
migrations/0018_lowly_wallow.sql
Normal file
@@ -0,0 +1,10 @@
|
||||
CREATE TABLE "notification_sub" (
|
||||
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
|
||||
"user_id" text NOT NULL,
|
||||
"notification_id" uuid NOT NULL,
|
||||
"emails" text[] DEFAULT '{}',
|
||||
CONSTRAINT "notification_sub_user_notification_unique" UNIQUE("user_id","notification_id")
|
||||
);
|
||||
--> statement-breakpoint
|
||||
ALTER TABLE "notification_sub" ADD CONSTRAINT "notification_sub_user_id_user_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."user"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
||||
ALTER TABLE "notification_sub" ADD CONSTRAINT "notification_sub_notification_id_notifications_id_fk" FOREIGN KEY ("notification_id") REFERENCES "public"."notifications"("id") ON DELETE cascade ON UPDATE no action;
|
||||
Reference in New Issue
Block a user