Summary
Add structured logging to the migration infrastructure so that operators can diagnose schema changes in production. Each applied migration should emit at minimum:
- Migration name / version
- Start and end timestamps
- Affected row counts for backfill steps
- Any errors, with full context
Logging should use the existing tracing instrumentation already in the codebase. SQL comments identifying individual backfill steps are also recommended as a complementary aid.
Background
This was identified as out of scope during review of PR #306, which added the 00000000000007_align_news_schema migration pair. The current migration infrastructure logs only five generic statements and provides no per-migration observability, making production diagnostics difficult for operators troubleshooting schema changes.
Backlinks
Summary
Add structured logging to the migration infrastructure so that operators can diagnose schema changes in production. Each applied migration should emit at minimum:
Logging should use the existing
tracinginstrumentation already in the codebase. SQL comments identifying individual backfill steps are also recommended as a complementary aid.Background
This was identified as out of scope during review of PR
#306, which added the00000000000007_align_news_schemamigration pair. The current migration infrastructure logs only five generic statements and provides no per-migration observability, making production diagnostics difficult for operators troubleshooting schema changes.Backlinks
@leynos