From 1ffd67e0148160d87866bb7f25bc5513a12b67d2 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Mon, 20 Jul 2015 14:28:30 -0700 Subject: Get rid of false foreign key in Relay. --- controller/schema.sql.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'controller/schema.sql.c') diff --git a/controller/schema.sql.c b/controller/schema.sql.c index 78123db4..efeb280c 100644 --- a/controller/schema.sql.c +++ b/controller/schema.sql.c @@ -68,12 +68,11 @@ "\n"\ "CREATE TABLE Relay (\n"\ " networkId char(16) NOT NULL REFERENCES Network(id) ON DELETE CASCADE,\n"\ -" nodeId char(10) NOT NULL REFERENCES Node(id) ON DELETE CASCADE,\n"\ -" phyAddress varchar(64) NOT NULL,\n"\ -" PRIMARY KEY (networkId, nodeId)\n"\ +" address char(10) NOT NULL,\n"\ +" phyAddress varchar(64) NOT NULL\n"\ ");\n"\ "\n"\ -"CREATE INDEX Relay_networkId ON Relay (networkId);\n"\ +"CREATE UNIQUE INDEX Relay_networkId_address ON Relay (networkId,address);\n"\ "\n"\ "CREATE TABLE Rule (\n"\ " networkId char(16) NOT NULL REFERENCES Network(id) ON DELETE CASCADE,\n"\ -- cgit v1.2.3