feat(cli): add --from and --to options to limit what migrations to run
This commit is contained in:
parent
02c142e39a
commit
9ef0fa2776
8 changed files with 485 additions and 346 deletions
|
|
@ -35,6 +35,10 @@ Options:
|
|||
-p, --plugin <name> The plugin(s) to use (can be specified multiple times)
|
||||
-r, --reporter <name> The reporter to use for reporting the migration progress
|
||||
-l, --limit <count> Limit the number of migrations to run
|
||||
-f, --from <name> Start running migrations from the given migration name, the given name doesn't need to exist
|
||||
and is compared in lexicographical order
|
||||
-t, --to <name> Skip migrations after the given migration name, the given name doesn't need to exist
|
||||
and is compared in lexicographical order
|
||||
--dry List the pending migrations that would be run without actually running them
|
||||
--color Force color output (this option is passed to the reporter)
|
||||
--no-color Disable color output (this option is passed to the reporter)
|
||||
|
|
@ -45,6 +49,8 @@ Examples:
|
|||
emigrate up -d ./migrations --storage @emigrate/mysql
|
||||
emigrate up -d src/migrations -s postgres -r json --dry
|
||||
emigrate up -d ./migrations -s mysql --import dotenv/config
|
||||
emigrate up --limit 1
|
||||
emigrate up --to 20231122120529381_some_migration_file.js
|
||||
```
|
||||
|
||||
### Examples
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue