Custom table name
You can override the table name in config:Custom replication path
In clustered setups you can override the migrations table replication path used byReplicatedReplacingMergeTree(...):
Summary
Ifmigrations.table.is_replicated is true, clisma treats the environment as clustered and creates the migrations table using ReplicatedReplacingMergeTree(...) with ON CLUSTER "<detected_cluster>".
If migrations.table.is_replicated is not set (or false), it uses ReplacingMergeTree() in standalone mode.
If migrations.table.replication_path is set, clisma also enables replicated mode even when migrations.table.is_replicated is omitted.
If your ClickHouse has multiple non-default clusters, set migrations.table.cluster_name to choose which cluster should be used in ON CLUSTER.
How config affects migrations table DDL
1) Standalone (default)
Config:2) Replicated (auto cluster detection)
Config:3) Replicated with explicit cluster and path
Config:Does clisma support down migrations?
No. This is intentional. ClickHouse DDL and data changes are often non-transactional and may be irreversible. Reliable rollbacks are hard to guarantee and can introduce more risk than they remove. The expected workflow is to apply new forward migrations that correct or compensate for previous changes.Does clisma support multi-statement migrations?
Yes. You can include multiple SQL statements in one file. Separate statements with semicolons; clisma splits them outside of strings and comments.Checksum mismatch
If a migration file changes after being applied, clisma will fail with a checksum mismatch. You have two options:- Revert the migration file back to the applied version and create a new forward migration.
- If you really need to override the checksum, update the stored checksum in the migrations table (use
clisma checksum <migration path>). This is risky and should only be done if you fully understand the consequences.