diff --git a/database/user.sql b/database/user.sql index 6a016a2..00626f3 100644 --- a/database/user.sql +++ b/database/user.sql @@ -10,7 +10,7 @@ CREATE TABLE users ( created_at TIMESTAMPTZ DEFAULT NOW(), last_login TIMESTAMPTZ, CONSTRAINT chk_role CHECK (role IN ('ADMIN', 'MODERATOR', 'MEMBER')), - CONSTRAINT chk_password_length CHECK (LENGTH(password) >= 8), + CONSTRAINT chk_password_length CHECK (LENGTH(password) >= 10), CONSTRAINT chk_full_name_length CHECK (LENGTH(full_name) <= 100), CONSTRAINT chk_email_format CHECK (email ~* '^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4}$'), CONSTRAINT chk_username_format CHECK (username ~* '^[A-Za-z0-9_]+$')