From 5c9411a671dbc62297863bfa732929e197557697 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Mon, 29 Jun 2015 14:52:09 -0700 Subject: Untested -- modifications to support IP ranges instead of ip/mask for IP assignment pools, also add portId to Rule for future use. --- controller/schema.sql | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'controller/schema.sql') diff --git a/controller/schema.sql b/controller/schema.sql index 1328d999..8ff1ff77 100644 --- a/controller/schema.sql +++ b/controller/schema.sql @@ -18,10 +18,7 @@ CREATE TABLE Network ( CREATE TABLE Node ( id char(10) PRIMARY KEY NOT NULL, - identity varchar(4096) NOT NULL, - lastAt varchar(64), - lastSeen integer NOT NULL DEFAULT(0), - firstSeen integer NOT NULL DEFAULT(0) + identity varchar(4096) NOT NULL ); CREATE TABLE Gateway ( @@ -53,7 +50,7 @@ CREATE TABLE IpAssignmentPool ( ipVersion integer NOT NULL DEFAULT(4) ); -CREATE INDEX IpAssignmentPool_networkId ON IpAssignmentPool (networkId); +CREATE UNIQUE INDEX IpAssignmentPool_networkId_ipRangeStart ON IpAssignmentPool (networkId,ipRangeStart); CREATE TABLE Member ( networkId char(16) NOT NULL REFERENCES Network(id) ON DELETE CASCADE, -- cgit v1.2.3