Skip to content

Commit

Permalink
Update usage example
Browse files Browse the repository at this point in the history
  • Loading branch information
antonkomarev committed Jan 15, 2022
1 parent a3e945f commit 257368c
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,28 @@ php vendor/bin/php-db-migration-validator --rule=irreversible migrations/
php vendor/bin/php-db-migration-validator --rule=irreversible app/migrations/ vendor/migrations/
```

### Help

```
$ php vendor/bin/php-db-migration-validator help
PHP DB Migration Validator
--------------------------
by Anton Komarev <[email protected]>
Usage: php-db-migration-validator --rule=<rule> <path>
The following commands are available:
help Shows this usage instructions.
Options:
--rules=<rule> Validates the database migration(s) in the specified <path>.
Exits with code 1 on validation errors, 2 on other errors and 0 on success.
Available rules (at least one should be specified):
- irreversible — ensure if migration file has `down` method and this method throws an Exception.
```

## License

- `PHP DB Migration Validator` package is open-sourced software licensed under the [MIT license](LICENSE) by [Anton Komarev].
Expand Down
6 changes: 3 additions & 3 deletions bin/php-db-migration-validator
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,10 @@ Usage: $binaryName --rule=<rule> \B<path>\C
Options:
\Y--rules=<rule>\C Validates the database migration(s) in the specified \G<path>\C are irreversible.
The tool will try to check if migration file has `down` method and this method throws an Exception.
\Y--rules=<rule>\C Validates the database migration(s) in the specified \G<path>\C.
Exits with code 1 on validation errors, 2 on other errors and 0 on success.
\BAt least one rule should be specified.\C
Available rules (\Bat least one should be specified\C):
- \Yirreversible\C — ensure if migration file has `down` method and this method throws an Exception.
EOF
,
Expand Down

0 comments on commit 257368c

Please sign in to comment.