Skip to content

fix(coderd/database): renumber duplicate migration 000596 to 000597 - #29568

Merged
ibetitsmike merged 1 commit into
mainfrom
fix/duplicate-migration-000596-aibridge
Sep 18, 2026
Merged

ibetitsmike merged 1 commit into
mainfrom
fix/duplicate-migration-000596-aibridge

Conversation

@blinkagent

@blinkagent blinkagent Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Two migrations landed on main with the same number:

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

Two migrations landed on main with the same number 000596, which makes golang-migrate fail to initialize with "duplicate migration file". Renumber the AI Gateway workspace context migration to 000597.
@github-actions github-actions Bot added the community Pull Requests and issues created by the community. label Sep 18, 2026
@ibetitsmike
ibetitsmike enabled auto-merge (squash) September 18, 2026 15:20
@ibetitsmike
ibetitsmike merged commit eec4915 into main Sep 18, 2026
50 of 51 checks passed
@ibetitsmike
ibetitsmike deleted the fix/duplicate-migration-000596-aibridge branch September 18, 2026 15:35
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 18, 2026
@johnstcn

Copy link
Copy Markdown
Member

Thanks @ibetitsmike ❤️

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

community Pull Requests and issues created by the community.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants