diff options
| author | Adam Ierymenko <adam.ierymenko@gmail.com> | 2017-04-04 16:47:14 -0700 |
|---|---|---|
| committer | Adam Ierymenko <adam.ierymenko@gmail.com> | 2017-04-04 16:47:14 -0700 |
| commit | 6fabaae736de2daa1ba0c22701bbb11539e3fba7 (patch) | |
| tree | 13d3e7e374887a8eccb2be96e46ac687eacb7da8 /root-watcher/schema.sql | |
| parent | 1b2cfd63e552c32cd3efecc6c586a947f638af9f (diff) | |
| download | infinitytier-6fabaae736de2daa1ba0c22701bbb11539e3fba7.tar.gz infinitytier-6fabaae736de2daa1ba0c22701bbb11539e3fba7.zip | |
Add simple root server watcher (for our own new dashboard, but also for user use).
Diffstat (limited to 'root-watcher/schema.sql')
| -rw-r--r-- | root-watcher/schema.sql | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/root-watcher/schema.sql b/root-watcher/schema.sql new file mode 100644 index 00000000..bdb3a1cf --- /dev/null +++ b/root-watcher/schema.sql @@ -0,0 +1,21 @@ +/* Schema for ZeroTier root watcher log database */ + +/* If you cluster this DB using any PG clustering scheme that uses logs, you must remove UNLOGGED here! */ +CREATE UNLOGGED TABLE "Peer" +( + "ztAddress" BIGINT NOT NULL, + "timestamp" BIGINT NOT NULL, + "versionMajor" INTEGER NOT NULL, + "versionMinor" INTEGER NOT NULL, + "versionRev" INTEGER NOT NULL, + "rootId" INTEGER NOT NULL, + "phyPort" INTEGER NOT NULL, + "phyLinkQuality" REAL NOT NULL, + "phyLastReceive" BIGINT NOT NULL, + "phyAddress" INET NOT NULL +); + +CREATE INDEX "Peer_ztAddress" ON "Peer" ("ztAddress"); +CREATE INDEX "Peer_timestamp" ON "Peer" ("timestamp"); +CREATE INDEX "Peer_rootId" ON "Peer" ("rootId"); +CREATE INDEX "Peer_phyAddress" ON "Peer" ("phyAddress"); |
