Skip to content
This repository has been archived by the owner on Mar 31, 2023. It is now read-only.

Latest commit

 

History

History
33 lines (26 loc) · 1 KB

README.md

File metadata and controls

33 lines (26 loc) · 1 KB

liquibase-clickhouse

How to use

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.

Cluster mode

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.

What new in this fork

  • Added support for the latest ClickHouse driver version
  • Implemented locking via Redis, since ClickHouse doesn't support it at all