You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test(purchase): NeverStartedLegacyRampsBecomeNew skips 000127 once a later migration exists #1059
TestMigration_NeverStartedLegacyRampsBecomeNew (internal/purchase/plan_step_ledger_migration_integration_test.go, from #905) breaks as soon as any migration newer than 000127 exists.
stagedMigrations copies every migration except 000127_never_started_legacy_ramps_to_new and runs them, then adds 000127 and runs the migrator again. When a later migration is present (#1020 adds 000128, #1022 adds 000129), the first run already takes the schema past 127. golang-migrate never applies a version below the current one, so the second run is a no-op and 000127 never runs:
plan_step_ledger_migration_integration_test.go:91:
expected: "new"
actual : "legacy"
Messages: never started, no executions
This is the Integration Tests failure on #1022 (#1022). It will hit #1020 and every later migration too.
Fix: stage only the migrations numbered below 000127 for the first run, and add 000127 together with everything after it for the second run. The test then keeps exercising "upgrade from just before 000127" however many migrations follow.
Activity
IAmJSD commentedon Oct 17, 2026
Claiming: working on this
test(purchase): hold back later migrations when staging 000127 (#1060)