Files
softplayer-backend/migrations/20260506200734_accounts_init.up.sql
Nikolai Rodionov f15608e0ab
Some checks failed
ci/woodpecker/push/build Pipeline failed
Basic internal auth implementation
Signed-off-by: Nikolai Rodionov <allanger@badhouseplants.net>
2026-05-08 21:18:12 +02:00

9 lines
328 B
SQL

CREATE TABLE IF NOT EXISTS accounts (
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
);