-- ============================================================
-- 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;
