migrate icon indicating copy to clipboard operation
migrate copied to clipboard

Got error on apply clickhouse migrations from code

Open superlocrian opened this issue 3 years ago • 5 comments

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

superlocrian avatar Feb 17 '22 07:02 superlocrian

Yes, It dosent work for me too

sergey-telpuk avatar Feb 17 '22 15:02 sergey-telpuk

fixed in #707

sergey-telpuk avatar Feb 28 '22 07:02 sergey-telpuk

@sergey-telpuk Please merge https://github.com/golang-migrate/migrate/pull/707 so that I can use it.

makeavish avatar Mar 02 '22 19:03 makeavish

Related: #697

Kugelschieber avatar Mar 08 '22 15:03 Kugelschieber

Just chiming in to say that it will be cool when any of the three PRs that fix this get approved.

rtkaratekid avatar May 16 '22 19:05 rtkaratekid