201_channel_monitor_v2_refresh_5m.sql 538 B

123456789101112
  1. -- Channel Monitor V2 is designed around fixed UI buckets; refresh passive
  2. -- aggregation every 5 minutes and recompute the trailing bucket for each range.
  3. -- Only migrate the untouched factory row. A row with a newer version or an
  4. -- updater identity reflects an operator choice and must retain its 60-second
  5. -- interval (or any other valid setting).
  6. UPDATE channel_monitor_v2_config
  7. SET refresh_interval_seconds = 300,
  8. updated_at = NOW()
  9. WHERE id = 1
  10. AND version = 1
  11. AND updated_by IS NULL
  12. AND refresh_interval_seconds = 60;