Files
softplayer-backend/migrations/20260425183515_init.up.sql
Nikolai Rodionov c52c3d1046
All checks were successful
ci/woodpecker/push/build Pipeline was successful
WIP: Start implementing the internal auth
Signed-off-by: Nikolai Rodionov <allanger@badhouseplants.net>
2026-05-05 22:56:56 +02:00

9 lines
325 B
SQL

CREATE TABLE IF NOT EXISTS users (
uuid UUID PRIMARY KEY,
email VARCHAR(255) NOT NULL
CHECK (email ~* '^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}$') UNIQUE,
password_hash TEXT NOT NULL,
email_verified BOOLEAN NOT NULL DEFAULT FALSE,
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
);