This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
2020-10-13 09:29:42 -07:00
|
|
|
-- 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,
|
2020-10-14 12:49:18 -07:00
|
|
|
userId TEXT,
|
2020-10-13 09:29:42 -07:00
|
|
|
type TEXT NOT NULL,
|
|
|
|
payload TEXT NOT NULL,
|
|
|
|
validUntil INTEGER,
|
|
|
|
FOREIGN KEY(userId) REFERENCES users(id)
|
|
|
|
);
|
|
|
|
|
|
|
|
-- Down
|
|
|
|
|
|
|
|
DROP TABLE authenticators;
|
|
|
|
DROP TABLE users;
|