Gateways support in network controller schema and database (not implemented yet in client) toward GitHub issue #178

This commit is contained in:
Adam Ierymenko 2015-06-13 11:34:31 +02:00
parent 8a9715f183
commit 96a58becf8
6 changed files with 194 additions and 6 deletions

View file

@ -24,6 +24,15 @@ CREATE TABLE Node (
firstSeen integer NOT NULL DEFAULT(0)
);
CREATE TABLE Gateway (
networkId char(16) NOT NULL REFERENCES Network(id) ON DELETE CASCADE,
ip blob(16) NOT NULL,
ipVersion integer NOT NULL DEFAULT(4),
metric integer NOT NULL DEFAULT(0)
);
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,