aboutsummaryrefslogtreecommitdiff
path: root/migrations
diff options
context:
space:
mode:
authorDaniel García <[email protected]>2018-04-24 22:01:55 +0200
committerDaniel García <[email protected]>2018-04-24 22:01:55 +0200
commit4093bf92fe1fe63c185c1d4e7f94f8d91533ebde (patch)
treeef0ad0ddbeebb892f80dde097971afba01346613 /migrations
parenta4d2aad3315e7f72dc92ec9d0e0ba16a6507b181 (diff)
downloadvaultwarden-4093bf92fe1fe63c185c1d4e7f94f8d91533ebde.tar.gz
vaultwarden-4093bf92fe1fe63c185c1d4e7f94f8d91533ebde.zip
Initial organizations functionality: Creating orgs and inviting users
Diffstat (limited to 'migrations')
-rw-r--r--migrations/2018-02-17-205753_create_collections_and_orgs/up.sql14
1 files changed, 8 insertions, 6 deletions
diff --git a/migrations/2018-02-17-205753_create_collections_and_orgs/up.sql b/migrations/2018-02-17-205753_create_collections_and_orgs/up.sql
index a7b32320..29601a4a 100644
--- a/migrations/2018-02-17-205753_create_collections_and_orgs/up.sql
+++ b/migrations/2018-02-17-205753_create_collections_and_orgs/up.sql
@@ -18,12 +18,14 @@ CREATE TABLE users_collections (
);
CREATE TABLE users_organizations (
- user_uuid TEXT NOT NULL REFERENCES users (uuid),
- org_uuid TEXT NOT NULL REFERENCES organizations (uuid),
+ uuid TEXT NOT NULL PRIMARY KEY,
+ user_uuid TEXT NOT NULL REFERENCES users (uuid),
+ org_uuid TEXT NOT NULL REFERENCES organizations (uuid),
- key TEXT NOT NULL,
- status INTEGER NOT NULL,
- type INTEGER NOT NULL,
+ access_all BOOLEAN NOT NULL,
+ key TEXT NOT NULL,
+ status INTEGER NOT NULL,
+ type INTEGER NOT NULL,
- PRIMARY KEY (user_uuid, org_uuid)
+ UNIQUE (user_uuid, org_uuid)
);