dbmate 2.2.0 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +28 -1
  2. package/package.json +8 -8
package/README.md CHANGED
@@ -253,6 +253,33 @@ DATABASE_URL="sqlite:/tmp/database.sqlite3"
253
253
  DATABASE_URL="clickhouse://username:password@127.0.0.1:9000/database_name"
254
254
  ```
255
255
 
256
+ To work with ClickHouse cluster, there are 4 connection query parameters that can be supplied:
257
+
258
+ - `on_cluster` - Indicataion to use cluster statements and replicated migration table. (default: `false`) If this parameter is not supplied, other cluster related query parameters are ignored.
259
+ ```sh
260
+ DATABASE_URL="clickhouse://username:password@127.0.0.1:9000/database_name?on_cluster"
261
+
262
+ DATABASE_URL="clickhouse://username:password@127.0.0.1:9000/database_name?on_cluster=true"
263
+ ```
264
+
265
+ - `cluster_macro` (Optional) - Macro value to be used for ON CLUSTER statements and for the replciated migration table engine zookeeper path. (default: `{cluster}`)
266
+
267
+ ```sh
268
+ DATABASE_URL="clickhouse://username:password@127.0.0.1:9000/database_name?on_cluster&cluster_macro={my_cluster}"
269
+ ```
270
+
271
+ - `replica_macro` (Optional) - Macro value to be used for the replica name in the replciated migration table engine. (default: `{replica}`)
272
+
273
+ ```sh
274
+ DATABASE_URL="clickhouse://username:password@127.0.0.1:9000/database_name?on_cluster&replica_macro={my_replica}"
275
+ ```
276
+
277
+ - `zoo_path` (Optional) - The path to the table migration in ClickHouse/Zoo Keeper. (default: `/clickhouse/tables/<cluster_macro>/{table}`)
278
+
279
+ ```sh
280
+ DATABASE_URL="clickhouse://username:password@127.0.0.1:9000/database_name?on_cluster&zoo_path=/zk/path/tables"
281
+ ```
282
+
256
283
  [See other supported connection options](https://github.com/ClickHouse/clickhouse-go#dsn).
257
284
 
258
285
  ### Creating Migrations
@@ -521,7 +548,7 @@ Why another database schema migration tool? Dbmate was inspired by many other to
521
548
  | Ability to wait for database to become ready | :white_check_mark: | | | | | | |
522
549
  | Database connection string loaded from environment variables | :white_check_mark: | | | | | | :white_check_mark: |
523
550
  | Automatically load .env file | :white_check_mark: | | | | | | |
524
- | No separate configuration file | :white_check_mark: | | | :white_check_mark: | :white_check_mark: | :white_check_mark: | |
551
+ | No separate configuration file | :white_check_mark: | :white_check_mark: | | :white_check_mark: | :white_check_mark: | :white_check_mark: | |
525
552
  | Language/framework independent | :white_check_mark: | :white_check_mark: | | :white_check_mark: | | | :white_check_mark: | :white_check_mark: |
526
553
  | **Drivers** |
527
554
  | PostgreSQL | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dbmate",
3
- "version": "2.2.0",
3
+ "version": "2.4.0",
4
4
  "description": "A lightweight, framework-agnostic database migration tool",
5
5
  "repository": "https://github.com/amacneil/dbmate",
6
6
  "homepage": "https://github.com/amacneil/dbmate#readme",
@@ -24,12 +24,12 @@
24
24
  "build": "tsc --build"
25
25
  },
26
26
  "optionalDependencies": {
27
- "@dbmate/linux-ia32": "2.2.0",
28
- "@dbmate/linux-x64": "2.2.0",
29
- "@dbmate/linux-arm": "2.2.0",
30
- "@dbmate/linux-arm64": "2.2.0",
31
- "@dbmate/darwin-x64": "2.2.0",
32
- "@dbmate/darwin-arm64": "2.2.0",
33
- "@dbmate/win32-x64": "2.2.0"
27
+ "@dbmate/linux-ia32": "2.4.0",
28
+ "@dbmate/linux-x64": "2.4.0",
29
+ "@dbmate/linux-arm": "2.4.0",
30
+ "@dbmate/linux-arm64": "2.4.0",
31
+ "@dbmate/darwin-x64": "2.4.0",
32
+ "@dbmate/darwin-arm64": "2.4.0",
33
+ "@dbmate/win32-x64": "2.4.0"
34
34
  }
35
35
  }