[
  {
    "type": "raw_sql",
    "description": "Spec 049 Issue-5 follow-up v2: Backfill minOccurrences and triggerShiftMinHoursInclusive on already-adopted storeBreakPolicyRule rows from their source preset rule. Required because stores adopted a preset BEFORE 049_004/049_005 ran got the column defaults (1 / true) instead of the per-state values now seeded on the shared preset table. The UPDATE is naturally idempotent (running again sets the same values); no check_query needed — the migration_log entry gates re-runs.",
    "database": "{{store}}",
    "sql": "UPDATE storeBreakPolicyRule r INNER JOIN kiosk_buykiosk.breakPolicyPresetRule p ON r.sourcePresetRuleId = p.id SET r.minOccurrences = p.minOccurrences, r.triggerShiftMinHoursInclusive = p.triggerShiftMinHoursInclusive WHERE r.sourcePresetRuleId IS NOT NULL AND r.isOverride = 0"
  }
]
