-- p2_decision_fusion_columns_rollback.sql
-- 2026-04-26 P2-DB-Fix by Claude — db-expert P0 三修（P0.3）rollback
-- 回滾 p2_decision_fusion_columns.sql

BEGIN;

ALTER TABLE approval_records
    DROP CONSTRAINT IF EXISTS chk_complexity_tier;

ALTER TABLE approval_records
    DROP COLUMN IF EXISTS composite_score,
    DROP COLUMN IF EXISTS complexity_tier,
    DROP COLUMN IF EXISTS decision_fusion_details;

COMMIT;

-- CONCURRENTLY 必須在 transaction 外
DROP INDEX CONCURRENTLY IF EXISTS ix_approval_composite_score;
DROP INDEX CONCURRENTLY IF EXISTS ix_approval_complexity_tier;
