Fix #106 -- Add forgotten documentation about IgnoreMigration()

This commit is contained in:
David-Wobrock committed 2020-05-04 20:41:51 +02:00
1 parent 87085a2cd4
commit 87040845ed
2 files changed
+19 -1

No files matched your search

+2 -1
View File
@@ -1,6 +1,7 @@
## 2.2.0
* Make summary output more friendly (thanks @vald-phoenix)
* Make summary output more friendly (Thanks to @vald-phoenix)
* Add forgotten documentation about `IgnoreMigration`
## 2.1.0
+17
View File
@@ -27,6 +27,23 @@ Detailed command line options:
|`--quiet or -q {ok,ignore,warning,error}` | Suppress certain output messages, instead of writing them to stdout. |
|`--warnings-as-errors` | Handle warnings as errors and therefore return an error status code if we should. |
## Ignoring migrations
You can also ignore migrations by adding an `IgnoreMigration()` to your migration operations:
```
from django.db import migrations, models
import django_migration_linter as linter
class Migration(migrations.Migration):
dependencies = [...]
operations = [
linter.IgnoreMigration(),
# ...
]
```
Or you can restrict the migrations that should be selected by a file containing there paths with the `--include-migrations-from` option.
## Ignoring migration tests
You can also ignore backward incompatible migration tests by adding this option during execution: