-- Phase 30: Drift 報告 AI 人話摘要欄位
-- 2026-04-10 Claude Code (ADR-067): DriftNarratorService 寫入 narrative_text
--   qwen2.5:7b-instruct 生成繁中摘要，儲存於 drift_reports 表

DO $$
BEGIN
    IF NOT EXISTS (
        SELECT 1 FROM information_schema.columns
        WHERE table_name = 'drift_reports' AND column_name = 'narrative_text'
    ) THEN
        ALTER TABLE drift_reports ADD COLUMN narrative_text TEXT DEFAULT NULL;
        COMMENT ON COLUMN drift_reports.narrative_text IS
            'AI 生成的繁體中文人話摘要 (qwen2.5:7b-instruct, Phase 30 ADR-067)';
    END IF;
END $$;
