From 06345b2c1ba39cf67a4bee8cfc76ebea4c5ad1a9 Mon Sep 17 00:00:00 2001
From: Bryan Newbold <bnewbold@robocracy.org>
Date: Tue, 18 Sep 2018 11:13:08 -0700
Subject: first attempt at auth in DB schema

---
 rust/migrations/2018-05-12-001226_init/up.sql | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

(limited to 'rust/migrations/2018-05-12-001226_init/up.sql')

diff --git a/rust/migrations/2018-05-12-001226_init/up.sql b/rust/migrations/2018-05-12-001226_init/up.sql
index 22f5cca6..c6444b8e 100644
--- a/rust/migrations/2018-05-12-001226_init/up.sql
+++ b/rust/migrations/2018-05-12-001226_init/up.sql
@@ -16,9 +16,12 @@ CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
 
 CREATE TABLE editor (
     id                  UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
-    username            TEXT NOT NULL UNIQUE,
+    username            TEXT NOT NULL UNIQUE, -- TODO: alphanum and length constraints?
     is_admin            BOOLEAN NOT NULL DEFAULT false,
+    is_bot              BOOLEAN NOT NULL DEFAULT false,
     registered          TIMESTAMP WITH TIME ZONE DEFAULT now() NOT NULL,
+    auth_epoch          TIMESTAMP WITH TIME ZONE DEFAULT now() NOT NULL,
+    wrangler_id         UUID REFERENCES editor(id),
     active_editgroup_id UUID -- REFERENCES( editgroup(id) via ALTER below
 );
 
-- 
cgit v1.2.3

