clickhouse-migrations 0.1.0 → 0.1.2

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 (3) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +6 -3
  3. package/package.json +17 -5
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 VVVi
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -13,7 +13,7 @@ npm install --global clickhouse-migrations
13
13
 
14
14
  Create a directory, where migrations will be stored. It will be used as the value for the `--migrations-home` option.
15
15
 
16
- Create migrations in the directory, which should look like `1_`some_text`.sql`, `2_`other_text`.sql`, ... `10_`more_test`.sql`. Here, is important: migration versions followed by underscore - `1_`, `2_`, ...`10_`..., and file extension `.sql`. Any text can follow by version number. The version number should increase for every next migration.
16
+ In the directory, create migrations - which should be named like: `1_`some_text`.sql`, `2_`other_text`.sql`, ... `10_`more_test`.sql`. What is important here: migration versions followed by underscore - `1_`, `2_`, ...`10_`..., and file extension `.sql`. Any text can follow by version number. The version number should increase for every next migration.
17
17
 
18
18
  For migrations' content should be used correct SQL ClickHouse queries. A few queries can be used in one migration file. Every query should end with `;`. The queries could be idempotent - for example: `CREATE TABLE IF NOT EXISTS table ...;` Comments should start with `--- `.
19
19
 
@@ -22,7 +22,8 @@ For migrations' content should be used correct SQL ClickHouse queries. A few que
22
22
  $ clickhouse-migrations migrate <options>
23
23
 
24
24
  Required options
25
- --host=<name> Clickhouse hostname in format https://clichouse
25
+ --host=<name> Clickhouse hostname, in
26
+ format https://clichouse
26
27
  --port=<number> Port
27
28
  --user=<name> Username
28
29
  --pass=<password> Password
@@ -30,6 +31,8 @@ For migrations' content should be used correct SQL ClickHouse queries. A few que
30
31
  --migrations-home=<dir> Migrations' directory
31
32
 
32
33
  Examples
33
- clickhouse-migrations migrate --host=http://localhost --port=8123 --user=default --pass='' --db-name=analytics --migrations-home=/app/clickhouse/migrations
34
+ clickhouse-migrations migrate --host=http://localhost
35
+ --port=8123 --user=default --pass=''
36
+ --db-name=analytics --migrations-home=/app/clickhouse/migrations
34
37
 
35
38
  ```
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "clickhouse-migrations",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "NodeJS ClickHouse Migrations",
5
- "bin": {
6
- "clickhouse-migrations": "lib/cli.js"
7
- },
8
- "scripts": {
5
+ "bin": {
6
+ "clickhouse-migrations": "lib/cli.js"
7
+ },
8
+ "scripts": {
9
9
  "build": "tsc",
10
10
  "test": "jest --config jestconfig.json",
11
11
  "format": "prettier --write \"src/**/*.ts\" \"src/**/*.js\"",
@@ -18,6 +18,7 @@
18
18
  },
19
19
  "author": "",
20
20
  "license": "MIT",
21
+ "repository": "VVVi/clickhouse-migrations",
21
22
  "dependencies": {
22
23
  "@clickhouse/client": "^0.0.9",
23
24
  "commander": "^9.4.1"
@@ -25,6 +26,7 @@
25
26
  "devDependencies": {
26
27
  "@types/jest": "^29.2.2",
27
28
  "@types/node": "^18.11.9",
29
+ "@typescript-eslint/parser": "^5.43.0",
28
30
  "eslint": "^8.26.0",
29
31
  "eslint-config-prettier": "^8.5.0",
30
32
  "jest": "^29.2.2",
@@ -34,5 +36,15 @@
34
36
  },
35
37
  "files": [
36
38
  "lib/**/*"
39
+ ],
40
+ "keywords": [
41
+ "clickhouse-migrations",
42
+ "clickhouse-migration",
43
+ "clickhouse-migrate",
44
+ "clickhouse",
45
+ "migrations",
46
+ "migration",
47
+ "migrate",
48
+ "cli"
37
49
  ]
38
50
  }