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
when run in tool mode, action to execute, valid actions are: ["apply" "addTenant" "config" "diskMigrations" "dbTenants" "dbMigrations"] (default "apply")
14
13
-configFile string
15
-
path to migrator.yaml (default "migrator.yaml")
14
+
path to migrator configuration yaml file (default "migrator.yaml")
16
15
-mode string
17
-
migrator mode to run: "tool" or "server" (default "tool")
16
+
migrator mode to run: ["tool" "server"] (default "tool")
17
+
-tenant string
18
+
when run in tool mode and action set to "addTenant", specifies new tenant name
Migrator will scan all directories under `baseDir` directory. Migrations listed under `singleSchemas` directories will be applied once. Migrations listed under `tenantSchemas` directories will be applied for all tenants fetched using `tenantsSql`.
45
+
Migrator will scan all directories under `baseDir` directory. Migrations listed under `singleSchemas` directories will be applied once. Migrations listed under `tenantSchemas` directories will be applied for all tenants fetched using `tenantSelectSql`.
44
46
45
47
SQL migrations in both `singleSchemas` and `tenantsSchemas` can use `{schema}` placeholder which is automatically replaced by migrator to the current schema. For example:
46
48
47
49
```
50
+
create schema if not exists {schema};
48
51
create table if not exists {schema}.modules ( k int, v text );
49
52
insert into {schema}.modules values ( 123, '123' );
50
53
```
@@ -79,34 +82,18 @@ Port is configurable in `migrator.yaml` and defaults to 8080. Should you need HT
79
82
80
83
Currently migrator supports the following databases:
0 commit comments