add missing unique constraint
There was a unique constraint missing on the active_checks table.
This commit is contained in:
parent
6beb37eb96
commit
7e387d55b9
|
@ -63,7 +63,7 @@ CREATE TABLE public.checks (
|
|||
);
|
||||
|
||||
CREATE TABLE public.active_checks (
|
||||
check_id bigint NOT NULL references checks(id) on delete cascade,
|
||||
check_id bigint NOT NULL unique references checks(id) on delete cascade,
|
||||
mapping_id int not null references mappings(id),
|
||||
cmdline text[] NOT NULL,
|
||||
next_time timestamp with time zone DEFAULT now() NOT NULL,
|
||||
|
@ -94,8 +94,6 @@ CREATE TABLE public.notifications (
|
|||
);
|
||||
|
||||
|
||||
CREATE INDEX ON public.active_checks USING btree (check_id);
|
||||
|
||||
CREATE INDEX ON public.active_checks USING btree (next_time) WHERE enabled;
|
||||
|
||||
CREATE INDEX ON public.checks USING btree (command_id);
|
||||
|
|
Loading…
Reference in New Issue