🌐 US-Proxy
class="logged-out env-production page-responsive" style="word-wrap: break-word;" >
Skip to content

fix(coderd/database/migrations): resolve duplicate 000554 migration collision - #27581

Merged
jakehwll merged 1 commit into
mainfrom
jakehwll/DEVEX-226-fix-migration-000554-collision
Jul 28, 2026
Merged

fix(coderd/database/migrations): resolve duplicate 000554 migration collision#27581
jakehwll merged 1 commit into
mainfrom
jakehwll/DEVEX-226-fix-migration-000554-collision

Conversation

@jakehwll

Copy link
Copy Markdown
Contributor

🤖 This PR was written by Coder Agents on behalf of Jake Howell.

Problem

main currently has two migrations sharing version 000554:

Both merged around the same time. #26851 was renumbered to 000554 when 000553 was the latest, but aibridge_token_usage_spend_export_index claimed 000554 and merged too, leaving a duplicate version number on main. Duplicate migration versions break the migration sequence.

Fix

Renumber the legacy none login migration to the next free slot, 000555, leaving the aibridge migration at 000554:

  • 000554_legacy_none_login_to_password.{up,down}.sql -> 000555_legacy_none_login_to_password.{up,down}.sql
  • migrate_test.go: TestMigration000554... -> TestMigration000555..., priorMigrationVersion 553 -> 554, and the os.ReadFile filename.

The migration is data-only and unchanged; only its version number moves. TestMigration000555LegacyNoneLoginToPassword passes locally.

The same collision exists on release/2.36 via the backport (#27578), which has been renumbered to 000555 to match.

Resolves DEVEX-226 follow-up.

… collision

Both 000554_aibridge_token_usage_spend_export_index and
000554_legacy_none_login_to_password landed on main with the same version
number. Renumber the legacy none login migration to 000555 and update
migrate_test.go accordingly.
@linear-code

linear-code Bot commented Jul 28, 2026

Copy link
Copy Markdown

DEVEX-226

@jakehwll
jakehwll marked this pull request as ready for review July 28, 2026 11:24

@mtojek mtojek left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@jakehwll
jakehwll enabled auto-merge (squash) July 28, 2026 11:24
@jakehwll
jakehwll merged commit bd5d640 into main Jul 28, 2026
49 of 52 checks passed
@jakehwll
jakehwll deleted the jakehwll/DEVEX-226-fix-migration-000554-collision branch July 28, 2026 11:35
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 28, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants