smon/sql/00012.sql
2024-05-05 21:06:31 +02:00

14 lines
604 B
SQL

CREATE TABLE public.notification_send (
id serial NOT NULL,
notification_id int4 NOT NULL,
"uuid" char(36) NOT NULL,
send timestamptz DEFAULT now() NOT NULL,
ok bool NOT NULL,
error jsonb NULL,
acknowledged bool DEFAULT false NOT NULL,
problem_id int8 NOT NULL,
CONSTRAINT notification_send_pk PRIMARY KEY (id),
CONSTRAINT notification_send_notification_fk FOREIGN KEY (notification_id) REFERENCES public.notification(id) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT notification_send_problem_fk FOREIGN KEY (problem_id) REFERENCES public.problem(id) ON DELETE CASCADE ON UPDATE CASCADE
);