Files
softplayer-backend/migrations/20260506200734_accounts_init.up.sql
2026-05-06 22:18:08 +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
);