(1) Both nodeId and portId in Rule can be NULL, (2) remove on delete cascade since rules should never mysteriously disappear from the rules table. If it let you delete a node with rules, that would be a UI or cleanup function bug.

This commit is contained in:
Adam Ierymenko 2015-06-29 10:47:47 -07:00
parent f05e62deae
commit 48a2ad032a
2 changed files with 4 additions and 4 deletions

View file

@ -78,8 +78,8 @@
"CREATE TABLE Rule (\n"\
" networkId char(16) NOT NULL REFERENCES Network(id) ON DELETE CASCADE,\n"\
" ruleNo integer NOT NULL,\n"\
" nodeId char(10) NOT NULL REFERENCES Node(id) ON DELETE CASCADE,\n"\
" portId char(10) NOT NULL REFERENCES Node(id) ON DELETE CASCADE,\n"\
" nodeId char(10) REFERENCES Node(id),\n"\
" portId char(10) REFERENCES Node(id),\n"\
" vlanId integer,\n"\
" vlanPcp integer,\n"\
" etherType integer,\n"\