notification added in with subs :D
This commit is contained in:
9
migrations/0016_colorful_exiles.sql
Normal file
9
migrations/0016_colorful_exiles.sql
Normal file
@@ -0,0 +1,9 @@
|
||||
CREATE TABLE "notifications" (
|
||||
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
|
||||
"name" text NOT NULL,
|
||||
"description" text NOT NULL,
|
||||
"active" boolean DEFAULT false,
|
||||
"options" jsonb DEFAULT '[]'::jsonb
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE UNIQUE INDEX "notify_name" ON "notifications" USING btree ("name");
|
||||
1
migrations/0017_famous_joseph.sql
Normal file
1
migrations/0017_famous_joseph.sql
Normal file
@@ -0,0 +1 @@
|
||||
ALTER TABLE "notifications" ADD COLUMN "interval" text DEFAULT '5';
|
||||
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;
|
||||
1209
migrations/meta/0016_snapshot.json
Normal file
1209
migrations/meta/0016_snapshot.json
Normal file
File diff suppressed because it is too large
Load Diff
1216
migrations/meta/0017_snapshot.json
Normal file
1216
migrations/meta/0017_snapshot.json
Normal file
File diff suppressed because it is too large
Load Diff
1291
migrations/meta/0018_snapshot.json
Normal file
1291
migrations/meta/0018_snapshot.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -113,6 +113,27 @@
|
||||
"when": 1772415040979,
|
||||
"tag": "0015_neat_donald_blake",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 16,
|
||||
"version": "7",
|
||||
"when": 1774026354811,
|
||||
"tag": "0016_colorful_exiles",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 17,
|
||||
"version": "7",
|
||||
"when": 1774030327338,
|
||||
"tag": "0017_famous_joseph",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 18,
|
||||
"version": "7",
|
||||
"when": 1774032587305,
|
||||
"tag": "0018_lowly_wallow",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user