feat: init

This commit is contained in:
zhenyi
2026-06-07 11:30:56 +08:00
commit 563381c1ca
361 changed files with 41327 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
-- Auth identity uniqueness and lookup hardening.
CREATE UNIQUE INDEX IF NOT EXISTS uq_user_username_active_ci
ON "user" (lower(username))
WHERE deleted_at IS NULL;
CREATE UNIQUE INDEX IF NOT EXISTS uq_user_mail_verified_email_ci
ON user_mail (lower(email))
WHERE is_verified = true;