From 6da89f825c2f3b1ffda98e71a37521ae6248420d Mon Sep 17 00:00:00 2001 From: Gibheer Date: Fri, 16 Nov 2018 11:16:30 +0100 Subject: [PATCH] add unique index on check_id --- schema/20181116.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schema/20181116.sql b/schema/20181116.sql index cb97acf..48baa8f 100644 --- a/schema/20181116.sql +++ b/schema/20181116.sql @@ -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,