From 75f76ae311c351dc5aa27117327b6bb4f399c07b Mon Sep 17 00:00:00 2001 From: Brian Flowers Date: Wed, 27 May 2020 08:44:26 -0400 Subject: [PATCH] Adding unique constraint on lookups table --- bin/firewall-lists | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/firewall-lists b/bin/firewall-lists index f7dd8d4..fc54c56 100755 --- a/bin/firewall-lists +++ b/bin/firewall-lists @@ -251,7 +251,8 @@ CREATE TABLE lookups(id INTEGER, domain INTEGER, ip VARCHAR(128), lookupDate DATETIME default CURRENT_TIMESTAMP, - PRIMARY KEY(id)); + PRIMARY KEY(id) + UNIQUE(domain, ip)); EOF fi } -- 1.8.3.1