init
This commit is contained in:
21
backend/database/migrations/20251215084449_users.sql
Normal file
21
backend/database/migrations/20251215084449_users.sql
Normal file
@@ -0,0 +1,21 @@
|
||||
-- +goose Up
|
||||
-- +goose StatementBegin
|
||||
CREATE TABLE IF NOT EXISTS users(
|
||||
id bigserial PRIMARY KEY,
|
||||
created_at timestamptz NOT NULL DEFAULT NOW(),
|
||||
updated_at timestamptz NOT NULL DEFAULT NOW(),
|
||||
deleted_at timestamptz,
|
||||
username varchar(255) NOT NULL UNIQUE,
|
||||
password varchar(255) NOT NULL,
|
||||
roles text[] NOT NULL DEFAULT ARRAY['user'],
|
||||
status varchar(50) NOT NULL DEFAULT 'active',
|
||||
metas jsonb NOT NULL DEFAULT '{}',
|
||||
verified_at timestamptz
|
||||
);
|
||||
|
||||
-- +goose StatementEnd
|
||||
-- +goose Down
|
||||
-- +goose StatementBegin
|
||||
DROP TABLE IF EXISTS users;
|
||||
|
||||
-- +goose StatementEnd
|
||||
Reference in New Issue
Block a user