fix(store): migration version collision — 0008_repo_secrets vs 0008_run_title breaks store.Open on main #115
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Cloonar/coding-lab#115
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Both
migrations/{sqlite,postgres}/0008_repo_secrets.sql(#104, merged ind4cfbde) andmigrations/{sqlite,postgres}/0008_run_title.sql(#111, merged later inc95b8d5) claim goose version 8. The #111 branch was cut before #104 merged, so each branch was green in isolation; the collision only exists on merged main and nobody re-ran the suite post-merge.Impact:
goose.NewProviderrejects duplicate versions, sostore.Openfails for BOTH dialects — the server cannot boot on current main, and every test that opens a store (internal/store,internal/labctlfixtures,internal/httpapi, …) fails withduplicate migration version 8.TestMigrationParitycatches it:go test ./internal/store/ -run TestMigrationParityis red atc95b8d5.Fix: rename
0008_run_title.sql→0009_run_title.sqlin both dialect directories (the later-merged migration yields). Safe for every real deployment lineage: goose records applied versions by number; any DB that migrated before the collision has 8 = repo_secrets (main lineage — #104 merged first), and no DB can have applied run_title as 8 because a tree containing both files fails at provider construction, before applying anything.Found while shipping #105 (its verification requires a green suite). The rename is included as a separate
fix(store)commit in the #105 PR so that PR can run green; this issue tracks the defect itself and closes with that PR.