Liquibase uses tables DATABASECHANGELOG and DATABASECHANGELOGLOCK to store the current state (locked/unlocked) and the list of applied migrations. For the case when we want to apply migrations on all nodes of our cluster, liquibase should also replicate its data on each node of the cluster. It permit us to execute our migration scripts on any node and to avoid duplicate executions.
added reading of liquibaseClickhouse.conf, if the file exists in classpath, liquibase uses replication. The file contains cluster-specific parameters.
replace the now() clickhouse funciton by the fixed date to avoid cluster issues
tables are created with the ReplicatedMergeTree and ON CLUSTER clause in the replication mode
modified queries to use ON CLUSTER clause. Even if we use a table engine with automatic replication to all nodes of the cluster, this clause (in theory) permit to accelerate the data propagation.
Liquibase uses tables
DATABASECHANGELOG
andDATABASECHANGELOGLOCK
to store the current state (locked/unlocked) and the list of applied migrations. For the case when we want to apply migrations on all nodes of our cluster, liquibase should also replicate its data on each node of the cluster. It permit us to execute our migration scripts on any node and to avoid duplicate executions.liquibaseClickhouse.conf
, if the file exists in classpath, liquibase uses replication. The file contains cluster-specific parameters.