Reputation: 705
I am trying to use Flyway for versioning a clickhouse database. My flyway.conf
file looks like this:
flyway.url=jdbc:clickhouse://<host>:<port>/<database>?ssl=true
flyway.user=<user>
flyway.password=<password>
I want to use the CLI tool for using flyway, and I have a running docker image of fly way by executing the following commands (got it from this tutorial)
docker pull redgate/flyway
docker run --rm redgate/flyway
After running the docker run --rm -v <paths> redgate/flyway migrate
, I get the following error:
ERROR: No database found to handle jdbc:clickhouse://<host>:<port>/<database>?ssl=true
SSL is required for my connection.
Based on this clickhouse documentation I know that there is a support for clickhouse in flyway but not sure how the flyway.conf
setup should look like.
Upvotes: 1
Views: 1315
Reputation: 61
So... it seems that you need more than just the clickhouse jdbc jar to do this (and there is an open PR for the flyway people: https://github.com/flyway/flyway/pull/3611)
What I did:
Created a very simple pom.xml only to download all the clickhouse jdbc dependencies
Cloned (and builded it) the flyway's fork from the guy who created the clickhouse plugin (from here: https://github.com/sazonov/flyway/tree/clickhouse-support, note that the plugin is on branch "clickhouse-support")
Created a simple Dockerfile to add everything on the base flyway/flyway docker image:
After all that, I was able to make my migrations work on Clickhouse
Upvotes: 0