From 7f4da08ff7af6f5d2a06001f70dae906a859c66e Mon Sep 17 00:00:00 2001
From: Adam Ierymenko <adam.ierymenko@gmail.com>
Date: Thu, 1 Jun 2017 12:57:44 -0700
Subject: .

---
 attic/root-watcher/schema.sql | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)
 create mode 100644 attic/root-watcher/schema.sql

(limited to 'attic/root-watcher/schema.sql')

diff --git a/attic/root-watcher/schema.sql b/attic/root-watcher/schema.sql
new file mode 100644
index 00000000..ade0fa3e
--- /dev/null
+++ b/attic/root-watcher/schema.sql
@@ -0,0 +1,20 @@
+/* Schema for ZeroTier root watcher log database */
+
+CREATE 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");
-- 
cgit v1.2.3

