Add gradle dependency:
implementation 'com.productmadness:liquibase-clickhouse:<latest version>'
Apply the annotation:
@EnableClickhouseLiquibase
Then autoconfiguration will do the magic by injecting handlers for the ClickHouse DB into the Liquibase.
The cluster mode can be activated by adding the liquibaseClickhouse.conf file to the classpath (liquibase/lib/).
cluster {
clusterName="{cluster}"
tableZooKeeperPathPrefix="/clickhouse/tables/{shard}/{database}/"
tableReplicaName="{replica}"
}
In this mode, liquibase will create its own tables as replicated.
All changes in these files will be replicated on the entire cluster.
Your updates should also affect the entire cluster either by using ON CLUSTER clause, or by using replicated tables.
- Added support for the latest ClickHouse driver version
- Implemented locking via Redis, since ClickHouse doesn't support it at all