Minor DB updates

A node can support multiple streams. Unfortunately, an address can't so there might be multiple entries of the same address for different streams.
Also, store object types. I think we'll need them later, specially in search for public keys we requested.
This commit is contained in:
2015-04-18 14:31:17 +02:00
parent e611e5e20a
commit ceae11b5c6
5 changed files with 54 additions and 13 deletions

View File

@ -1,9 +1,9 @@
CREATE TABLE Node (
ip BINARY(16) NOT NULL,
port INT NOT NULL,
services BIGINT NOT NULL,
stream BIGINT NOT NULL,
services BIGINT NOT NULL,
time BIGINT NOT NULL,
PRIMARY KEY (ip, port)
PRIMARY KEY (ip, port, stream)
);

View File

@ -3,5 +3,6 @@ CREATE TABLE Inventory (
stream BIGINT NOT NULL,
expires BIGINT NOT NULL,
data BLOB NOT NULL,
type BIGINT NOT NULL,
version INT NOT NULL
);