diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2017-09-30 22:14:48 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2017-09-30 22:14:48 +0100 |
commit | 8e9cd7cdb0a0f0fe591c2ecc25ae480fa0a5f799 (patch) | |
tree | de46361b23538b6ba9644898a9f5a55b4aeed9e4 /db/schema.sql | |
parent | a369e1c1a178697d0f92cf82c5bdb23c1883925e (diff) | |
parent | 83825ebf47cfd40ac649853347c8352944a3d32a (diff) |
Merge branch 'phone-number-work'
Diffstat (limited to 'db/schema.sql')
-rw-r--r-- | db/schema.sql | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/db/schema.sql b/db/schema.sql index f428ff59d..f2197dc52 100644 --- a/db/schema.sql +++ b/db/schema.sql @@ -21,9 +21,11 @@ create table sessions ( -- users table create table users ( id serial not null primary key, - email text not null unique, + email text, + email_verified boolean not null default 'f', name text, phone text, + phone_verified boolean not null default 'f', password text not null default '', from_body integer, flagged boolean not null default 'f', @@ -34,6 +36,8 @@ create table users ( area_id integer, extra text ); +CREATE UNIQUE INDEX users_email_verified_unique ON users (email) WHERE email_verified; +CREATE UNIQUE INDEX users_phone_verified_unique ON users (phone) WHERE phone_verified; -- Record details of reporting bodies, including open311 configuration details create table body ( |