Skip to content

beekpr/beekeeper-liquibase-clickhouse

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Beekeeper Liquibase Clickhouse

This is the parent repository for Beekeeper Liquibase Clickhouse, a liquibase extension for Clickhouse.

Usage

Compiling

./mvnw package -s settings.xml

Installing snapshots for local development

You can install the current state into the local Maven repository with ./mvnw install -s settings.xml

The version will be SNAPSHOT

Releasing

Make sure you bump the version in version.properties. The release will be done by our jenkins-job when the PR branch is merged back to master. Please add your and explain your change to the changelog below.

Local Release

./mvnw -Drevision=${VERSION} -U clean deploy -s settings.xml

Beekeeper Changes

Added useParameterlessReplicatedMergeTreeForTables parameter

This parameter allows to use simple ReplicatedMergeTree for changelog tables instead of passing in shard and prefix.

cluster {
    clusterName="{cluster}"
    tableZooKeeperPathPrefix="/clickhouse/tables/{shard}/{database}/"
    tableReplicaName="{replica}"
    useParameterlessReplicatedMergeTreeForTables="{true/false}"
}

Original Docs

liquibase-clickhouse

Supported operations: update, rollback (with provided SQL script), tag

Maven dependency:

<dependency>
    <groupId>com.mediarithmics</groupId>
    <artifactId>liquibase-clickhouse</artifactId>
    <version>Latest version from Maven Central</version>
</dependency>

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}"
    useParameterlessReplicatedMergeTreeForTables="{true/false}"
}

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.


Important changes

From the version 0.7.0 the liquibase-clickhouse supports replication on a cluster. Liquibase v4.6.1.

From the version 0.6.0 the extension adapted for the liquibase v4.3.5.

About

ClickHouse Liquibase Migrations Extension

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%