mirror of
https://github.com/ForFarmTeam/ForFarm.git
synced 2025-12-19 05:54:08 +01:00
15 lines
422 B
SQL
15 lines
422 B
SQL
-- +goose Up
|
|
CREATE TABLE users (
|
|
id SERIAL PRIMARY KEY,
|
|
uuid UUID NOT NULL,
|
|
username TEXT NULL,
|
|
password TEXT NOT NULL,
|
|
email TEXT NOT NULL,
|
|
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
|
|
updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
|
|
is_active BOOLEAN NOT NULL DEFAULT TRUE
|
|
);
|
|
|
|
CREATE UNIQUE INDEX idx_users_uuid ON users(uuid);
|
|
CREATE UNIQUE INDEX idx_users_username ON users(username);
|