add unique index on check_id

This commit is contained in:
Gibheer 2018-11-16 11:16:30 +01:00
parent bfd2b5d324
commit 6da89f825c

View File

@ -57,7 +57,7 @@ CREATE TABLE notifications (
);
CREATE TABLE 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,
cmdline text[] NOT NULL,
next_time timestamp with time zone DEFAULT now() NOT NULL,
states integer[] DEFAULT ARRAY[0] NOT NULL,