(Feat): Initial Commit
This commit is contained in:
19
migrations/20200428072232-create-users.sql
Normal file
19
migrations/20200428072232-create-users.sql
Normal file
@@ -0,0 +1,19 @@
|
||||
-- +migrate Up
|
||||
CREATE TABLE users (
|
||||
id uuid NOT NULL DEFAULT uuid_generate_v4 (),
|
||||
username varchar(255),
|
||||
"password" text,
|
||||
is_active bool NOT NULL,
|
||||
-- TODO: use user_scope enum as "scopes user_scope[]" when supported
|
||||
-- https://github.com/volatiletech/sqlboiler/issues/739
|
||||
scopes text[] NOT NULL,
|
||||
last_authenticated_at timestamptz,
|
||||
created_at timestamptz NOT NULL,
|
||||
updated_at timestamptz NOT NULL,
|
||||
CONSTRAINT users_pkey PRIMARY KEY (id),
|
||||
CONSTRAINT users_username_key UNIQUE (username)
|
||||
);
|
||||
|
||||
-- +migrate Down
|
||||
DROP TABLE IF EXISTS users;
|
||||
|
||||
Reference in New Issue
Block a user