feat(cli): add the --import option for importing modules/packages before commands are run
Can for instance be used to load environment variables using Dotenv
This commit is contained in:
parent
e6e4433018
commit
9f91bdcfa0
12 changed files with 131 additions and 40 deletions
|
|
@ -62,6 +62,12 @@ Show command help and exit
|
|||
|
||||
The directory where the migration files are located. The given path should be absolute or relative to the current working directory.
|
||||
|
||||
### `-i`, `--import <module>`
|
||||
|
||||
A module to import before listing the migrations. This option can be specified multiple times.
|
||||
|
||||
Can for instance be used to load environment variables using [dotenv](https://github.com/motdotla/dotenv) with `--import dotenv/config`.
|
||||
|
||||
### `-s`, `--storage <name>`
|
||||
|
||||
The <Link href="/plugins/storage/">storage plugin</Link> to use, which is responsible for where to store the migration history.
|
||||
|
|
|
|||
|
|
@ -69,6 +69,12 @@ The directory where the migration files are located. The given path should be ab
|
|||
|
||||
Force removal of the migration history entry even if the migration file does not exist or it's in a non-failed state.
|
||||
|
||||
### `-i`, `--import <module>`
|
||||
|
||||
A module to import before remove the migration. This option can be specified multiple times.
|
||||
|
||||
Can for instance be used to load environment variables using [dotenv](https://github.com/motdotla/dotenv) with `--import dotenv/config`.
|
||||
|
||||
### `-s`, `--storage <name>`
|
||||
|
||||
The <Link href="/plugins/storage/">storage plugin</Link> to use, which is responsible for where to store the migration history.
|
||||
|
|
|
|||
|
|
@ -68,6 +68,12 @@ List the pending migrations that would be run without actually running them
|
|||
|
||||
The directory where the migration files are located. The given path should be absolute or relative to the current working directory.
|
||||
|
||||
### `-i`, `--import <module>`
|
||||
|
||||
A module to import before running the migrations. This option can be specified multiple times.
|
||||
|
||||
Can for instance be used to load environment variables using [dotenv](https://github.com/motdotla/dotenv) with `--import dotenv/config`.
|
||||
|
||||
### `-s`, `--storage <name>`
|
||||
|
||||
The <Link href="/plugins/storage/">storage plugin</Link> to use, which is responsible for where to store the migration history.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue