How do you manage database schema migrations in a high-scale, production environment?
Using the provided migration metadata, write a query that reports the current production migration health for every service, including services without a production migration.
Output
- One row per service with
service_name, migration_version, latest_status, failed_step_count, total_step_count, and duration_seconds
- Include services without a production run, using NULL migration details and zero step counts
- Return the latest production run per service, ordered by
service_name ascending