fix: remove extra bound argument in BigQuery InsertMigration (#817)
`InsertMigration` in the BigQuery driver interpolates `version` into the SQL string, then also passes it to `db.Exec` as a bound argument. The query has no placeholders, so the argument has nothing to bind to. Real BigQuery silently ignores it, but newer versions of goccy/bigquery-emulator reject the insert: ``` googleapi: Error 400: failed to exec INSERT INTO ... : sql: expected 0 arguments, got 1 ``` This makes `dbmate up` fail against the emulator right after applying the first migration. `DeleteMigration` does the same interpolation without the extra argument, so this looks like a leftover from #523. Following review, both `InsertMigration` and `DeleteMigration` now bind `version` as a query parameter instead of interpolating it into the SQL, and `InsertMigration` runs on the transaction `Migrate()` passes in (as `DeleteMigration` already did). Tested the `pkg/driver/bigquery` suite against emulator 0.4.4 (the version pinned in docker-compose.yml, which tolerates the extra arg) and 0.8.1 (which rejects it) - passes on both. CI doesn't catch this today because it pins 0.4.4; happy to bump the image here or in a follow-up if you want the regression covered. --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
I
igormakhtes committed
f9f372f1e2c8da71e726aa9a447fcd941e4c4c69
Parent: 2183dd8
Committed by GitHub <noreply@github.com>
on 7/24/2026, 4:48:00 AM