fix(db): renumber audit_actor_stamps migration to clear 000074 collision - #1261
Conversation
…ision PR #1011 added 000074_audit_actor_stamps while prod already has 000074_repair_partial_migration_058_067 applied and recorded in schema_migrations. The duplicate caused "CI - Build & Test / Integration Tests" to fail at "Run database migrations" with duplicate migration file error. Keep the repair at 074 (prod-applied) and move the new audit stamp migration to 077 (next free slot).
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
Important Review skippedNo new commits to review since the last review. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughMigration ChangesAudit Actor Stamp Migration (000077)
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Root cause
PR #1011 added
000074_audit_actor_stampswhile prod already has000074_repair_partial_migration_058_067applied and recorded inschema_migrations. The duplicate migration number caused the "CI - Build & Test / Integration Tests" job to fail at "Run database migrations" with:Fix
000074_repair_partial_migration_058_067at its existing number (prod-applied; recorded inschema_migrationsas version 74).000074_audit_actor_stamps->000077_audit_actor_stamps(next free slot after 000076)..up.sqland.down.sqlto reflect 000077.Verification
dups=$(ls internal/database/postgres/migrations/*.up.sql | cut -c-6 | sort | uniq -d)returns empty (pre-commit collision check passes).go build ./...succeeds.000074entry (the repair) and one000077entry (audit stamps) in the migrations directory.000074_audit_actor_stampsanywhere in the codebase (grep clean).Safety check
000074_audit_actor_stampswas merged today via PR #1011 and is NOT yet applied to any environment. Safe to renumber.Summary by CodeRabbit