We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the Bug
If parameters are given to ReplicatedMergeTree, the CREATE TABLE query fails because it is missing the ORDER BY statement. This is because the code simply checks for table ending in "Tree" before adding this statement. (https://github.com/golang-migrate/migrate/blob/master/database/clickhouse/clickhouse.go#L251).
Steps to Reproduce Steps to reproduce the behavior:
x-migrations-table-engine=ReplicatedMergeTree(%27/clickhouse/tables/all/{database}/{uuid}%27,%27{replica}%27)
error: code: 42, message: There was an error on [localhost:9000]: Code: 42. DB::Exception: ORDER BY or PRIMARY KEY clause is missing.
There is a workaround: add the ORDER BY to the URL option like this
x-migrations-table-engine=ReplicatedMergeTree(%27/clickhouse/tables/all/{database}/{uuid}%27,%27{replica}%27)%20ORDER%20BY%20sequence
Expected Behavior Migration succeeds in creating the table with the desired parameters
Migrate Version 4.17.0
Loaded Source Drivers
Source drivers: github, bitbucket, godoc-vfs, s3, go-bindata, file, github-ee, gitlab, gcs
Loaded Database Drivers
Database drivers: mongodb+srv, cockroachdb, postgres, redshift, yugabyte, ysql, stub, clickhouse, cassandra, neo4j, spanner, postgresql, rqlite, mongodb, firebird, pgx, pgx5, cockroach, crdb-postgres, sqlserver, firebirdsql, mysql, pgx4, yugabytedb
The text was updated successfully, but these errors were encountered:
Update clickhouse.go
1b8350d
golang-migrate#1097
No branches or pull requests
Describe the Bug
If parameters are given to ReplicatedMergeTree, the CREATE TABLE query fails because it is missing the ORDER BY statement. This is because the code simply checks for table ending in "Tree" before adding this statement. (https://github.com/golang-migrate/migrate/blob/master/database/clickhouse/clickhouse.go#L251).
Steps to Reproduce
Steps to reproduce the behavior:
x-migrations-table-engine=ReplicatedMergeTree(%27/clickhouse/tables/all/{database}/{uuid}%27,%27{replica}%27)
error: code: 42, message: There was an error on [localhost:9000]: Code: 42. DB::Exception: ORDER BY or PRIMARY KEY clause is missing.
There is a workaround: add the ORDER BY to the URL option like this
x-migrations-table-engine=ReplicatedMergeTree(%27/clickhouse/tables/all/{database}/{uuid}%27,%27{replica}%27)%20ORDER%20BY%20sequence
Expected Behavior
Migration succeeds in creating the table with the desired parameters
Migrate Version
4.17.0
Loaded Source Drivers
Source drivers: github, bitbucket, godoc-vfs, s3, go-bindata, file, github-ee, gitlab, gcs
Loaded Database Drivers
Database drivers: mongodb+srv, cockroachdb, postgres, redshift, yugabyte, ysql, stub, clickhouse, cassandra, neo4j, spanner, postgresql, rqlite, mongodb, firebird, pgx, pgx5, cockroach, crdb-postgres, sqlserver, firebirdsql, mysql, pgx4, yugabytedb
The text was updated successfully, but these errors were encountered: