Document new lintmigrations command arguments
This commit is contained in:
1 parent
6d595f1555
commit
7c5bcb9923
2 files changed
+22
-4
No files matched your search
+8
-1
@@ -1,5 +1,12 @@
|
|||||||
* Renamed `master` branch to `main`
|
## 3.0.0
|
||||||
|
|
||||||
|
**Breaking API change on `lintmigrations` command**:
|
||||||
|
* the positional argument `GIT_COMMIT_ID` becomes an optional argument with the named parameter ` --git-commit-id [GIT_COMMIT_ID]`
|
||||||
|
* the `lintmigrations` command takes now two positional arguments: `lintmigrations [app_label] [migration_name]`
|
||||||
|
|
||||||
|
Miscellaneous:
|
||||||
* Add complete and working support for `toml` configuration files
|
* Add complete and working support for `toml` configuration files
|
||||||
|
* Renamed `master` branch to `main`
|
||||||
|
|
||||||
## 2.5.3
|
## 2.5.3
|
||||||
|
|
||||||
|
|||||||
+14
-3
@@ -4,13 +4,24 @@
|
|||||||
|
|
||||||
The linter is installed as a Django app and is integrated through the Django management command system.
|
The linter is installed as a Django app and is integrated through the Django management command system.
|
||||||
|
|
||||||
`python manage.py lintmigrations [GIT_COMMIT_ID] ...`
|
`python manage.py lintmigrations [app_label] [migration_name]`
|
||||||
|
|
||||||
|
The three main usages are:
|
||||||
|
|
||||||
|
* Lint your entire code base
|
||||||
|
`python manage.py lintmigrations`
|
||||||
|
|
||||||
|
* Lint one Django app
|
||||||
|
`python manage.py lintmigrations app_label`
|
||||||
|
|
||||||
|
* Lint a specific migration
|
||||||
|
`python manage.py lintmigrations app_label migration_name`
|
||||||
|
|
||||||
Below the detailed command line options, which can all also be defined using a config file (`setup.cfg`, `tox.ini`, `.django_migration_linter.cfg`):
|
Below the detailed command line options, which can all also be defined using a config file (`setup.cfg`, `tox.ini`, `.django_migration_linter.cfg`):
|
||||||
|
|
||||||
| Parameter | Description |
|
| Parameter | Description |
|
||||||
|--------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------|
|
|--------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------|
|
||||||
|`GIT_COMMIT_ID` | If specified, only migrations since this commit will be taken into account. If not specified, all migrations will be linted.|
|
|`--git-commit-id GIT_COMMIT_ID` | If specified, only migrations since this commit will be taken into account. |
|
||||||
|`--ignore-name-contains IGNORE_NAME_CONTAINS` | Ignore migrations containing this name. |
|
|`--ignore-name-contains IGNORE_NAME_CONTAINS` | Ignore migrations containing this name. |
|
||||||
|`--ignore-name IGNORE_NAME [IGNORE_NAME ...]` | Ignore migrations with exactly one of these names. |
|
|`--ignore-name IGNORE_NAME [IGNORE_NAME ...]` | Ignore migrations with exactly one of these names. |
|
||||||
|`--include-name-contains INCLUDE_NAME_CONTAINS` | Include migrations containing this name. |
|
|`--include-name-contains INCLUDE_NAME_CONTAINS` | Include migrations containing this name. |
|
||||||
@@ -67,5 +78,5 @@ The migration test codes can be found in the [corresponding source code files](.
|
|||||||
## Production usage example
|
## Production usage example
|
||||||
|
|
||||||
[3YOURMIND](https://www.3yourmind.com/) is running the linter on every build getting pushed through CI.
|
[3YOURMIND](https://www.3yourmind.com/) is running the linter on every build getting pushed through CI.
|
||||||
That enables to be sure that the migrations will allow A/B testing, Blue/Green deployment and they won't break your development environment.
|
That enables to be sure that the migrations will allow A/B testing, Blue/Green deployment, and they won't break your development environment.
|
||||||
A non-zero error code is returned to express that at least one invalid migration has been found.
|
A non-zero error code is returned to express that at least one invalid migration has been found.
|
||||||
Reference in new issue
Block a user