fix: naming and redundancy issues

This commit is contained in:
Sérgio Salgado 2021-04-06 00:39:52 +01:00 committed by Josh Harvey
parent fff9523988
commit 40974dd501
15 changed files with 194 additions and 143 deletions

View file

@ -5,9 +5,9 @@ exports.up = function (next) {
`CREATE TYPE role AS ENUM('user', 'superuser')`,
`CREATE TABLE users (
id UUID PRIMARY KEY,
username VARCHAR(50) UNIQUE,
username VARCHAR(50) NOT NULL UNIQUE,
password VARCHAR(100),
role role DEFAULT 'user',
role role NOT NULL DEFAULT 'user',
enabled BOOLEAN DEFAULT true,
twofa_code VARCHAR(100),
created TIMESTAMPTZ NOT NULL DEFAULT now(),