12 lines
517 B
SQL
12 lines
517 B
SQL
CREATE TABLE public.notification (
|
|
id SERIAl NOT NULL,
|
|
user_id INT4 NOT NULL,
|
|
service VARCHAR DEFAULT 'NTFY' NOT NULL,
|
|
"configuration" JSONB DEFAULT '{}' NOT NULL,
|
|
prio INT DEFAULT 0 NOT NULL,
|
|
|
|
CONSTRAINT notification_pk PRIMARY KEY (id),
|
|
CONSTRAINT notification_unique UNIQUE (user_id,prio),
|
|
CONSTRAINT notification_user_fk FOREIGN KEY (user_id) REFERENCES "_webservice"."user"(id) ON DELETE CASCADE ON UPDATE CASCADE
|
|
);
|