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
+18
View File
@@ -0,0 +1,18 @@
-- ============================================================
-- Migration: 003_user_2fa.sql
-- Table: user_2fa — TOTP two-factor authentication
-- ============================================================
BEGIN;
CREATE TABLE IF NOT EXISTS user_2fa (
user_id UUID PRIMARY KEY REFERENCES "user"(id) ON DELETE CASCADE,
secret TEXT NULL,
backup_codes TEXT NOT NULL,
enabled BOOLEAN NOT NULL,
created_at TIMESTAMPTZ NOT NULL,
updated_at TIMESTAMPTZ NOT NULL
);
COMMIT;