diff options
author | Gibheer <gibheer+git@zero-knowledge.org> | 2018-12-12 13:33:30 +0100 |
---|---|---|
committer | Gibheer <gibheer+git@zero-knowledge.org> | 2018-12-12 13:33:30 +0100 |
commit | 7e387d55b93a17edcc405a2fbd20c4fb7a1be843 (patch) | |
tree | b1980edbb52fc6dde0595afc27177d13958f44e1 /schema/20181210.sql | |
parent | 6beb37eb9656430442d72328308b13b9e544a7a3 (diff) |
add missing unique constraint
There was a unique constraint missing on the active_checks table.
Diffstat (limited to 'schema/20181210.sql')
-rw-r--r-- | schema/20181210.sql | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/schema/20181210.sql b/schema/20181210.sql index 9c24197..7d344b0 100644 --- a/schema/20181210.sql +++ b/schema/20181210.sql @@ -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); |