aboutsummaryrefslogtreecommitdiffstats
path: root/rust/migrations/2018-05-12-001226_init/up.sql
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-09-18 11:13:08 -0700
committerBryan Newbold <bnewbold@robocracy.org>2018-12-26 23:32:43 -0800
commit06345b2c1ba39cf67a4bee8cfc76ebea4c5ad1a9 (patch)
tree89e77718876b677bb14feb8a2f93fd8674f3f2c3 /rust/migrations/2018-05-12-001226_init/up.sql
parent2842422bb04d176b7f41888e6eed10cd4b81bbac (diff)
downloadfatcat-06345b2c1ba39cf67a4bee8cfc76ebea4c5ad1a9.tar.gz
fatcat-06345b2c1ba39cf67a4bee8cfc76ebea4c5ad1a9.zip
first attempt at auth in DB schema
Diffstat (limited to 'rust/migrations/2018-05-12-001226_init/up.sql')
-rw-r--r--rust/migrations/2018-05-12-001226_init/up.sql5
1 files changed, 4 insertions, 1 deletions
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
);