Added notification manager

This commit is contained in:
Magnus Åhall 2024-05-05 10:10:04 +02:00
parent 317c233255
commit 49af9dc33c
6 changed files with 318 additions and 51 deletions

10
sql/00011.sql Normal file
View file

@ -0,0 +1,10 @@
CREATE TYPE notification_type AS ENUM('NTFY', 'PUSHOVER', 'HTTP', 'EMAIL');
CREATE TABLE public.notification (
id serial4 NOT NULL,
service notification_type DEFAULT 'NTFY' NOT NULL,
"configuration" jsonb DEFAULT '{}'::jsonb NOT NULL,
prio int4 DEFAULT 0 NOT NULL,
CONSTRAINT notification_pk PRIMARY KEY (id),
CONSTRAINT notification_unique UNIQUE (prio)
);