5.0.0
Breaking change: stop silently ignoring when the internal sqlmigrate
call fails and the linter cannot analyse the migration.
Instead, the linter crashes and lets the sqlmigrate
error raise, in order to avoid letting a problematic migration pass.
One common reason for such an error is the SQL generation which requires the database to be actually migrated in order to fetch actual constraint names from it.
The crash is a sign to double-check the migration. But if you are certain the migration is safe, you can ignore it (issue #209)
Features:
- Fixed
RunPython
model import check when using athrough
object likeMyModel.many_to_many.through.objects.filter(...)
(issue #218) - Mark the
IgnoreMigration
operation aselidable=True
- Handle
functools.partial
functions in RunPython data migrations - Add a new check,
CREATE_INDEX_EXCLUSIVE
to detect index creation while an exclusive lock is held
Bug:
- Don't detect not nullable field on partial index creation (issue #250)
Miscellaneous:
- Add support for Python 3.11
- Add support for Django 4.1
- Add support for Django 4.2
- Drop support for Django 2.2
- Internally rename "migration tests" to "migration checks"
- Add dataclasses internally instead of custom dicts
- Use pre-commit hooks for linting
- Add
mypy
andruff
usages