mirror of
https://github.com/coder/coder.git
synced 2026-10-16 14:48:56 +08:00
fix(coderd/database): renumber duplicate migration 000596 to 000597 (#29568)
Two migrations landed on `main` with the same number:
- `000596_template_usage_stats_session_usage.{up,down}.sql` (#29109)
- `000596_aibridge_workspace_context.{up,down}.sql` (#29235)
This makes golang-migrate fail to initialize the source driver:
```
failed to init driver with path .: duplicate migration file: 000596_template_usage_stats_session_usage.down.sql
```
Every job that touches the database is failing on `main` as a result
(gen, sqlc-vet, E2E, offline docs lint, PostgreSQL 17,
Linux/macOS/Windows test suites, race), plus
`coderd/database/gen/dump/main.go` panics.
This renames the later-merged AI Gateway migration to `000597`. The SQL
content is unchanged — it is a pure rename, so no schema dump or fixture
regeneration is required. `migration000596_test.go` and the
`testdata/fixtures/000596_template_usage_stats_session_usage.up.sql`
fixture belong to the earlier migration and are untouched.
Verified the source driver now initializes and resolves `597` as the
final version.
Created on behalf of @ibetitsmike
cc @johnstcn @EhabY
Co-authored-by: blink-so[bot] <211532188+blink-so[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
blink-so[bot]
parent
c47eb47393
commit
eec491530d
Reference in New Issue
Block a user