Skip to content

Commit 4e2ae5b

Browse files
committed
changed documentation by clickhouse databases
Signed-off-by: Ildar Valiullin <preved.911@gmail.com>
1 parent 547a2c9 commit 4e2ae5b

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎database/clickhouse/README.md‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
|------------|-------------|
77
| `x-migrations-table`| Name of the migrations table |
88
| `x-migrations-table-engine`| Engine to use for the migrations table, defaults to TinyLog |
9+
| `x-cluster-name` | Name of cluster for creating `schema_migrations` table cluster wide |
910
| `database` | The name of the database to connect to |
1011
| `username` | The user to sign in as |
1112
| `password` | The user's password |
@@ -18,4 +19,6 @@
1819
* The Clickhouse driver does not natively support executing multipe statements in a single query. To allow for multiple statements in a single migration, you can use the `x-multi-statement` param. There are two important caveats:
1920
* This mode splits the migration text into separately-executed statements by a semi-colon `;`. Thus `x-multi-statement` cannot be used when a statement in the migration contains a string with a semi-colon.
2021
* The queries are not executed in any sort of transaction/batch, meaning you are responsible for fixing partial migrations.
21-
* Using the default TinyLog table engine for the schema_versions table prevents backing up the table if using the [clickhouse-backup](https://github.com/AlexAkulov/clickhouse-backup) tool. If backing up the database with make sure the migrations are run with `x-migrations-table-engine=MergeTree`.
22+
* Using the default TinyLog table engine for the schema_versions table prevents backing up the table if using the [clickhouse-backup](https://github.com/AlexAkulov/clickhouse-backup) tool. If backing up the database with make sure the migrations are run with `x-migrations-table-engine=MergeTree`.
23+
* When `x-cluster-name` specified, `x-migrations-table-engine` also should be specify. Read about [replicated table engines](https://clickhouse.tech/docs/en/engines/table-engines/mergetree-family/replication/#table_engines-replication).
24+
* `x-cluster-name` param only specify `schema_migrations` table replication by given cluster. You should still write your migrations so that the application tables are replicated within the cluster.

0 commit comments

Comments
 (0)