pique/migrations/2024-05-31-175324_users/up.sql

7 lines
295 B
SQL

CREATE TABLE IF NOT EXISTS users (
id UUID_TEXT PRIMARY KEY NOT NULL UNIQUE,
username TEXT NOT NULL UNIQUE CHECK (LENGTH(username) <= 32),
password_hash TEXT NOT NULL,
email TEXT NOT NULL UNIQUE CHECK (LENGTH(email) <= 100),
name TEXT NOT NULL CHECK (LENGTH(name) <= 100)
);