#54 user accounts - db

This commit is contained in:
Andrea Vos 2020-10-13 18:29:42 +02:00
parent 7452fe9ba5
commit 8f05b54c0f

23
migrations/002-users.sql Normal file
View File

@ -0,0 +1,23 @@
-- Up
CREATE TABLE users (
id TEXT NOT NULL PRIMARY KEY,
username TEXT NOT NULL,
email TEXT NOT NULL,
roles TEXT NOT NULL,
avatarSource TEXT
);
CREATE TABLE authenticators (
id TEXT NOT NULL PRIMARY KEY,
userId TEXT NOT NULL,
type TEXT NOT NULL,
payload TEXT NOT NULL,
validUntil INTEGER,
FOREIGN KEY(userId) REFERENCES users(id)
);
-- Down
DROP TABLE authenticators;
DROP TABLE users;