mirror of
https://github.com/ZeroTier/ZeroTierOne
synced 2025-07-15 01:23:14 -07:00
Add NodeHistory table on sqlite controller.
This commit is contained in:
parent
7a63fdc447
commit
f8eb6b0067
4 changed files with 62 additions and 31 deletions
|
@ -35,6 +35,20 @@
|
|||
" identity varchar(4096) NOT NULL\n"\
|
||||
");\n"\
|
||||
"\n"\
|
||||
"CREATE TABLE NodeHistory (\n"\
|
||||
" nodeId char(10) NOT NULL REFERENCES Node(id) ON DELETE CASCADE,\n"\
|
||||
" networkId char(16) NOT NULL REFERENCES Network(id) ON DELETE CASCADE,\n"\
|
||||
" networkVisitCounter INTEGER NOT NULL DEFAULT(0),\n"\
|
||||
" networkRequestAuthorized INTEGER NOT NULL DEFAULT(0),\n"\
|
||||
" requestTime INTEGER NOT NULL DEFAULT(0),\n"\
|
||||
" networkRequestMetaData VARCHAR(1024),\n"\
|
||||
" fromAddress VARCHAR(128)\n"\
|
||||
");\n"\
|
||||
"\n"\
|
||||
"CREATE INDEX NodeHistory_nodeId ON NodeHistory (nodeId);\n"\
|
||||
"CREATE INDEX NodeHistory_networkId ON NodeHistory (networkId);\n"\
|
||||
"CREATE INDEX NodeHistory_requestTime ON NodeHistory (requestTime);\n"\
|
||||
"\n"\
|
||||
"CREATE TABLE Gateway (\n"\
|
||||
" networkId char(16) NOT NULL REFERENCES Network(id) ON DELETE CASCADE,\n"\
|
||||
" ip blob(16) NOT NULL,\n"\
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue