docs(cli): document the relative file path support for the "remove" command

This commit is contained in:
Joakim Carlstein 2024-01-26 15:21:44 +01:00 committed by Joakim Carlstein
parent 2f6b4d23e0
commit 0faebbe647
4 changed files with 35 additions and 9 deletions

View file

@ -20,6 +20,24 @@ bun add @emigrate/cli
## Usage
```text
Usage: emigrate <options>/<command>
Options:
-h, --help Show this help message and exit
-v, --version Print version number and exit
Commands:
up Run all pending migrations (or do a dry run)
new Create a new migration file
list List all migrations and their status
remove Remove entries from the migration history
```
### `emigrate up`
```text
Usage: emigrate up [options]

View file

@ -440,14 +440,14 @@ const remove: Action = async (args) => {
allowPositionals: true,
});
const usage = `Usage: emigrate remove [options] <name>
const usage = `Usage: emigrate remove [options] <name/path>
Remove entries from the migration history.
This is useful if you want to retry a migration that has failed.
Arguments:
name The name of the migration file to remove from the history (required)
name/path The name of or relative path to the migration file to remove from the history (required)
Options:
@ -466,6 +466,7 @@ Examples:
emigrate remove -d migrations -s fs 20231122120529381_some_migration_file.js
emigrate remove --directory ./migrations --storage postgres 20231122120529381_some_migration_file.sql
emigrate remove -i dotenv/config -d ./migrations -s postgres 20231122120529381_some_migration_file.sql
emigrate remove -i dotenv/config -d ./migrations -s postgres migrations/20231122120529381_some_migration_file.sql
`;
if (values.help) {