bug(migrations): duplicate goose version 0008 — repo_secrets (#104) and run_title (#111) collide, Store.Open fails on main #117

Closed
opened 2026-07-10 19:37:15 +02:00 by dominik.polakovics · 0 comments

PRs #112 (secrets, #104) and #113 (run title, #111) merged independently, each adding a migration numbered 0008:

  • migrations/sqlite/0008_repo_secrets.sql + migrations/postgres/0008_repo_secrets.sql
  • migrations/sqlite/0008_run_title.sql + migrations/postgres/0008_run_title.sql

Goose refuses duplicate version numbers, so on current main every Store.Open fails — lab cannot start against a fresh or existing database, and every test package that opens a store fails. Found while verifying #108.

Fix (shipping in the #108 PR, branch afk/108): rename 0008_run_title.sql → 0009_run_title.sql in both dialects (run_title merged last), with #108's new migration taking 0010. A DB that already applied 0008 as repo_secrets (the only state a merged-main deployment can be in, since the collision blocks startup before any new migration runs) picks up run_title as 0009 cleanly. Only a dev database migrated from the pre-merge afk/111 branch (run_title applied as version 8) would skip repo_secrets — such a state dir needs recreating.

Process follow-up worth considering: a CI guard that fails on duplicate goose version numbers across a merge.

PRs #112 (secrets, #104) and #113 (run title, #111) merged independently, each adding a migration numbered 0008: - migrations/sqlite/0008_repo_secrets.sql + migrations/postgres/0008_repo_secrets.sql - migrations/sqlite/0008_run_title.sql + migrations/postgres/0008_run_title.sql Goose refuses duplicate version numbers, so on current main every Store.Open fails — lab cannot start against a fresh or existing database, and every test package that opens a store fails. Found while verifying #108. **Fix (shipping in the #108 PR, branch afk/108):** rename 0008_run_title.sql → 0009_run_title.sql in both dialects (run_title merged last), with #108's new migration taking 0010. A DB that already applied 0008 as repo_secrets (the only state a merged-main deployment can be in, since the collision blocks startup before any new migration runs) picks up run_title as 0009 cleanly. Only a dev database migrated from the pre-merge afk/111 branch (run_title applied as version 8) would skip repo_secrets — such a state dir needs recreating. Process follow-up worth considering: a CI guard that fails on duplicate goose version numbers across a merge.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Cloonar/coding-lab#117
No description provided.