diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2016-08-12 11:30:27 -0700 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2016-08-12 11:30:27 -0700 |
| commit | c30f74987ff9027e3f7be3a9f400134c17d555e6 (patch) | |
| tree | ee027622d3d73eeaeb5956ebba53306b59621c1f /controller/schema.sql | |
| parent | dd21c8a577f8bfba9caa58c7567893b2ec10aef9 (diff) | |
| download | infinitytier-c30f74987ff9027e3f7be3a9f400134c17d555e6.tar.gz infinitytier-c30f74987ff9027e3f7be3a9f400134c17d555e6.zip | |
Starting refactor of controller...
Diffstat (limited to 'controller/schema.sql')
| -rw-r--r-- | controller/schema.sql | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/controller/schema.sql b/controller/schema.sql index 479daa68..d1daf8d0 100644 --- a/controller/schema.sql +++ b/controller/schema.sql @@ -86,17 +86,9 @@ CREATE TABLE Route ( CREATE INDEX Route_networkId ON Route (networkId); -CREATE TABLE Relay ( - networkId char(16) NOT NULL REFERENCES Network(id) ON DELETE CASCADE, - address char(10) NOT NULL, - phyAddress varchar(64) NOT NULL -); - -CREATE UNIQUE INDEX Relay_networkId_address ON Relay (networkId,address); - CREATE TABLE Rule ( networkId char(16) NOT NULL REFERENCES Network(id) ON DELETE CASCADE, - policyId varchar(32), + capId integer, ruleNo integer NOT NULL, ruleType integer NOT NULL DEFAULT(0), "addr" blob(16), @@ -106,5 +98,15 @@ CREATE TABLE Rule ( "int4" integer ); -CREATE INDEX Rule_networkId_ruleNo ON Rule (networkId, ruleNo); -CREATE INDEX Rule_networkId_policyId ON Rule (networkId, policyId); +CREATE INDEX Rule_networkId_capId ON Rule (networkId,capId); + +CREATE TABLE MemberTC ( + networkId char(16) NOT NULL REFERENCES Network(id) ON DELETE CASCADE, + nodeId char(10) NOT NULL REFERENCES Node(id) ON DELETE CASCADE, + tagId integer, + tagValue integer, + capId integer, + capMaxCustodyChainLength integer NOT NULL DEFAULT(1) +); + +CREATE INDEX MemberTC_networkId_nodeId ON MemberTC (networkId,nodeId); |
