12 lines
517 B
MySQL
12 lines
517 B
MySQL
|
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
|
||
|
);
|