diff options
author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-06-29 10:40:31 -0700 |
---|---|---|
committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2015-06-29 10:40:31 -0700 |
commit | f05e62deae8c24a4f2a373ef190ef36b335399ee (patch) | |
tree | e6fa5b6c57673b175251686bcdaeeb614462fd9d /controller/schema.sql | |
parent | dbee1b38b3fce2cab93c46157b9144bfab73cf87 (diff) | |
download | infinitytier-f05e62deae8c24a4f2a373ef190ef36b335399ee.tar.gz infinitytier-f05e62deae8c24a4f2a373ef190ef36b335399ee.zip |
DB schema changes: separate portId in rules, ranges in IP assignment pools. (No code changes yet so code is broken.)
Diffstat (limited to 'controller/schema.sql')
-rw-r--r-- | controller/schema.sql | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/controller/schema.sql b/controller/schema.sql index d2261b2a..a3193f7d 100644 --- a/controller/schema.sql +++ b/controller/schema.sql @@ -36,6 +36,7 @@ CREATE UNIQUE INDEX Gateway_networkId_ip ON Gateway (networkId, ip); CREATE TABLE IpAssignment ( networkId char(16) NOT NULL REFERENCES Network(id) ON DELETE CASCADE, nodeId char(10) NOT NULL REFERENCES Node(id) ON DELETE CASCADE, + type integer NOT NULL DEFAULT(0), ip blob(16) NOT NULL, ipNetmaskBits integer NOT NULL DEFAULT(0), ipVersion integer NOT NULL DEFAULT(4) @@ -47,8 +48,8 @@ CREATE INDEX IpAssignment_networkId_nodeId ON IpAssignment (networkId, nodeId); CREATE TABLE IpAssignmentPool ( networkId char(16) NOT NULL REFERENCES Network(id) ON DELETE CASCADE, - ipNetwork blob(16) NOT NULL, - ipNetmaskBits integer NOT NULL, + ipRangeStart blob(16) NOT NULL, + ipRangeEnd blob(16) NOT NULL, ipVersion integer NOT NULL DEFAULT(4) ); @@ -77,6 +78,7 @@ CREATE TABLE Rule ( networkId char(16) NOT NULL REFERENCES Network(id) ON DELETE CASCADE, ruleNo integer NOT NULL, nodeId char(10) NOT NULL REFERENCES Node(id) ON DELETE CASCADE, + portId char(10) NOT NULL REFERENCES Node(id) ON DELETE CASCADE, vlanId integer, vlanPcp integer, etherType integer, |