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

8 lines
295 B
MySQL
Raw Normal View History

2024-06-01 00:10:22 +00:00
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),
2024-06-01 17:18:46 +00:00
name TEXT NOT NULL CHECK (LENGTH(name) <= 100)
2024-06-01 00:10:22 +00:00
);