gitdataai/libs/migrate/sql/m20250628_000003_create_user_2fa.sql
ZhenYi de85417053 refactor(service): update service layer, TOTP, and AI streaming
Refine room AI streaming logic, update TOTP auth error handling,
and adjust user 2FA migration order. Remove unused service exports.
2026-05-11 17:05:59 +08:00

11 lines
320 B
SQL

CREATE TABLE IF NOT EXISTS user_2fa
(
"user" UUID PRIMARY KEY,
method VARCHAR(255) NOT NULL,
secret VARCHAR(255),
backup_codes JSONB NOT NULL,
is_enabled BOOLEAN NOT NULL DEFAULT false,
created_at TIMESTAMPTZ NOT NULL,
updated_at TIMESTAMPTZ NOT NULL
);