Files
coder/coderd/database/migrations
Jake Howell bd5d640f1e fix(coderd/database/migrations): resolve duplicate 000554 migration collision (#27581)
> 🤖 This PR was written by Coder Agents on behalf of Jake Howell.

## Problem

`main` currently has **two migrations sharing version `000554`**:

- `000554_aibridge_token_usage_spend_export_index.{up,down}.sql`
- `000554_legacy_none_login_to_password.{up,down}.sql` (from #26851)

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.

[DEVEX-226]: https://linear.app/issue/DEVEX-226
2026-07-28 11:35:36 +00:00
..
2022-11-14 17:57:33 +00:00