Audit database migration reliability
Did a release make database migrations less reliable?
Measure migration success, rollback behavior, and duration by application release.
Published expected result
Migration success rate by release
| release | migration_runs | successful_runs | failed_runs | success_rate_pct | average_duration_ms |
|---|---|---|---|---|---|
| 2026.07.1 | 3 | 3 | 0 | 100 | 1,300 |
| 2026.07.2 | 4 | 2 | 2 | 50 | 1,450 |
| 2026.07.3 | 2 | 2 | 0 | 100 | 1,125 |
How to read the query
- Treating rollbacks as unsuccessful makes the release-level reliability measure explicit.
- Duration trends can reveal increasingly expensive schema changes before they fail.
- The migration identifier remains available for drilling into individual executions.
Decisions the SQL cannot make
- 1Block promotion when a release contains an unexplained failed or rolled-back migration.
- 2Review long-running migrations for locking and deploy-window risk.
- 3Separate retry success from first-attempt success if your runner emits attempts.
Continue from this lesson
Keep the result
Run this query on your own events
Create a free workspace only when you are ready to save the query, connect real events, and monitor the result. No credit card is required.