-- t-paliad-183 down — reverts the condition_expr translations written
-- by 084_backfill_condition_expr.up.sql. Mig 078 created the column
-- with NULL on every row; resetting non-NULL values to NULL undoes the
-- backfill cleanly (condition_flag is the source of truth for the
-- legacy code path and stays untouched).

SELECT set_config(
    'paliad.audit_reason',
    'rollback 084: reset condition_expr to mig 078 default (NULL)',
    true);

UPDATE paliad.deadline_rules
   SET condition_expr = NULL
 WHERE condition_expr IS NOT NULL;
