Files
HealthLog/prisma/migrations
Marc-André Bombeck bd538b02c2 feat(integrations): add parked state + per-kind failure counters schema
Two additive columns on integration_statuses driving B4 + B7:

- consecutive_failures_by_kind (jsonb) — bucketed counter
  { transient, reauth_required, persistent } so a transient hiccup
  followed by a persistent failure no longer resets the persistent
  streak counter. The single-column consecutive_failures stays for
  one release as a fallback; the alert ladder reads Math.max across
  buckets for backward compatibility.

- persistent_failure_started_at (timestamp) — start of the current
  persistent failure streak. Once >24h elapse with the persistent
  bucket still non-zero, the status writer flips state to 'parked'.

The state column stays free-form; 'parked' is recognised at the
application layer. Existing rows have NULL in both new columns and
are back-filled on the next write.
2026-05-21 22:19:29 +02:00
..
2026-03-10 20:14:33 +01:00