migrate icon indicating copy to clipboard operation
migrate copied to clipboard

no migration found for version 15: read down for version 15

Open sergey-telpuk opened this issue 3 years ago • 2 comments

no migration found for version 15: read down for version 15 

what's is going on?

sergey-telpuk avatar Feb 16 '22 09:02 sergey-telpuk

have same question: error: no migration found for version 5: read down for version 5

seriousFace-Ian avatar Feb 28 '22 02:02 seriousFace-Ian

@sergey-telpuk @seriousFace-Ian
The issue is that this tool uses ClickHouse driver V1 with (?,?,?) notation, while official Go ClickHouse driver V2 uses ($1,$2,$3) notation for SQL argument passing. https://github.com/golang-migrate/migrate/blob/57aead3125fa6354d48199ac37f5bca5293ee600/database/clickhouse/clickhouse.go#L196

Clickhouse guys decided to change the syntax for argument passing, which causes this issue.

Changing (?,?,?) to ($1,$2,$3) solves the issue, but I'm not sure how golang-migrate will distinguish between v1 and v2 versions.

I assume we just need to add a second driver clickhouse_v2 , but that will break URI structure

PR to fix this: https://github.com/golang-migrate/migrate/pull/707

gladkikhartem avatar Mar 12 '22 09:03 gladkikhartem