notification added in with subs :D

This commit is contained in:
2026-03-20 23:43:52 -05:00
parent 751c8f21ab
commit 2021141967
37 changed files with 5174 additions and 359 deletions

View 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;