smon/sql/00006.sql
2024-04-30 08:04:16 +02:00

10 lines
360 B
SQL

CREATE TABLE public.problem (
id serial8 NOT NULL,
trigger_id int4 NOT NULL,
"start" timestamptz DEFAULT now() NOT NULL,
"end" timestamptz NULL,
acknowledged bool DEFAULT false NOT NULL,
CONSTRAINT problem_pk PRIMARY KEY (id),
CONSTRAINT problem_trigger_fk FOREIGN KEY (trigger_id) REFERENCES public."trigger"(id) ON DELETE CASCADE ON UPDATE CASCADE
);