Adding unique constraint on lookups table master
authorBrian Flowers <git-admn@bsflowers.net>
Wed, 27 May 2020 12:44:26 +0000 (08:44 -0400)
committerBrian Flowers <git-admn@bsflowers.net>
Wed, 27 May 2020 12:44:26 +0000 (08:44 -0400)
bin/firewall-lists

index f7dd8d4..fc54c56 100755 (executable)
@@ -251,7 +251,8 @@ CREATE TABLE lookups(id INTEGER,
                             domain INTEGER,
                     ip VARCHAR(128),
                     lookupDate DATETIME default CURRENT_TIMESTAMP,
                             domain INTEGER,
                     ip VARCHAR(128),
                     lookupDate DATETIME default CURRENT_TIMESTAMP,
-                    PRIMARY KEY(id));
+                    PRIMARY KEY(id)
+                    UNIQUE(domain, ip));
 EOF
   fi
 }    
 EOF
   fi
 }