migrate
migrate copied to clipboard
Got error on apply clickhouse migrations from code
Describe the Bug I am trying to apply all migrations to local clickhouse database before all my intergration tests and got this error: code: 62, message: Cannot parse expression of type Int64 here: ?, ?, ?): While executing ValuesBlockInputFormat in line 0: INSERT INTO schema_migrations (version, dirty, sequence) VALUES (?, ?, ?)
Dropping the schema_migrations table didn't help
Steps to Reproduce Steps to reproduce the behavior:
import (
"github.com/golang-migrate/migrate/v4"
_ "github.com/golang-migrate/migrate/v4/database/clickhouse"
_ "github.com/golang-migrate/migrate/v4/source/file"
)
m, err := migrate.New("file://"+pathToSql, testClickhouseDsn)
require.NoError(t, err)
err = m.Up()
if err != migrate.ErrNoChange {
require.NoError(t, err)
}
serr, derr := m.Close()
require.NoError(t, serr)
require.NoError(t, derr)
Expected Behavior
Migrate Version
4.15.1
Obtained by running: migrate -version
Loaded Source Drivers
e.g. s3, github, go-bindata, gcs, file
Obtained by running: migrate -help
Loaded Database Drivers
e.g. spanner, stub, clickhouse, cockroachdb, crdb-postgres, postgres, postgresql, pgx, redshift, cassandra, cockroach, mysql
Obtained by running: migrate -help
Go Version 1.17
Yes, It dosent work for me too
fixed in #707
@sergey-telpuk Please merge https://github.com/golang-migrate/migrate/pull/707 so that I can use it.
Related: #697
Just chiming in to say that it will be cool when any of the three PRs that fix this get approved.