You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11-9Lines changed: 11 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,8 @@ migrator can run as a HTTP REST service. Further, there is a ready-to-go migrato
8
8
9
9
# Usage
10
10
11
+
Important: Migrator since its inception supported both CLI and REST API. However, CLI is deprecated as of v2.2 and will be removed in migrator v3.0. Starting v3.0 only REST API will be supported.
12
+
11
13
Short and sweet.
12
14
13
15
```
@@ -57,14 +59,6 @@ create table if not exists {schema}.modules ( k int, v text );
57
59
insert into {schema}.modules values ( 123, '123' );
* when adding a new tenant migrator creates a new schema automatically
66
-
* single schemas are not created automatically, for this you must add initial migration with `create schema` SQL statement (see example above)
67
-
68
62
# Server mode
69
63
70
64
When migrator is run with `-mode server` it starts a HTTP service and exposes simple REST API which you can use to invoke migrator actions remotely.
@@ -84,13 +78,21 @@ Some curl examples to get you started:
84
78
curl http://localhost:8080/
85
79
curl http://localhost:8080/diskMigrations
86
80
curl http://localhost:8080/tenants
87
-
curl -X POST -H "Content-Type: application/json" -d '{"name": "new_tenant"}' http://localhost:8080/tenants
88
81
curl http://localhost:8080/migrations
89
82
curl -X POST http://localhost:8080/migrations
83
+
curl -X POST -H "Content-Type: application/json" -d '{"name": "new_tenant"}' http://localhost:8080/tenants
90
84
```
91
85
92
86
Port is configurable in `migrator.yaml` and defaults to 8080. Should you need HTTPS capabilities I encourage you to use nginx/apache/haproxy for TLS offloading.
0 commit comments