Реализация на 5

This commit is contained in:
Grbisba
2026-11-17 13:08:13 +03:00
parent 470d9d6f1e
commit 60f48c0337
229 changed files with 74928 additions and 47 deletions
@@ -0,0 +1,18 @@
CREATE TABLE IF NOT EXISTS users
(
id UUID PRIMARY KEY,
name VARCHAR(100) NOT NULL,
username VARCHAR(32) NOT NULL,
password_hash TEXT NOT NULL,
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
CONSTRAINT users_username_unique UNIQUE (username),
CONSTRAINT users_username_format CHECK (username ~ '^[a-z0-9_]{3,32}$'),
CONSTRAINT users_name_not_blank CHECK (name !~ '^[[:space:]]*$'),
CONSTRAINT users_password_hash_not_empty CHECK (password_hash <> '')
);
---- create above / drop below ----
DROP TABLE IF EXISTS users;