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>
3 lines
75 B
SQL
3 lines
75 B
SQL
ALTER TABLE aibridge_interceptions
|
|
DROP COLUMN IF EXISTS workspace_id;
|