Django-migration-linter

Latest version: v5.2.0

Safety actively analyzes 723144 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 7

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]`

New features:
* raise warning when create or dropping an index in a non-concurrent manner using postgresql

Miscellaneous:
* Add complete and working support for `toml` configuration files
* Handle `--verbosity 0` or `-v 0` correctly to not print anything from the linter
* Add code coverage to the linter
* Renamed `master` branch to `main`

2.5.3

* Stop packaging the 'tests' module into the release wheel file
* Add Django 3.2 support

2.5.2

* Remove `toml` support for config files

2.5.1

* Remove `.editorconfig` from default config file
* Allow utf-8 encoding in config files

2.5.0

**Renamed lint checks**:
* `REVERSIBLE_DATA_MIGRATION` -> `RUNPYTHON_REVERSIBLE`
* `NAMING_CONVENTION_RUNPYTHON_ARGS` -> `RUNPYTHON_ARGS_NAMING_CONVENTION`
* `DATA_MIGRATION_MODEL_IMPORT` -> `RUNPYTHON_MODEL_IMPORT`
* `DATA_MIGRATION_MODEL_VARIABLE_NAME` -> `RUNPYTHON_MODEL_VARIABLE_NAME`
* `REVERSIBLE_RUNSQL_DATA_MIGRATION` -> `RUNSQL_REVERSIBLE`

Features/fixes:
* Add Python 3.9 support
* Make data migration model import error less strict (issue 121)
* Add warning detection on RunPython call when model variable name is not the same as model class name
* Run checks on RunSQL migration operations
* Rename the RunPython data migration lint checks for improved consistency
* Refactor and commonise the loggers, so that all modules the `django_migration_linter` logger
* Allow using configuration file for linter options
* Add option `--include-name` and `--include-name-contains` to only include migration with a certain name

Others:
* Switched from Travis CI to GitHub Actions for tests
* Apply `isort` to the project

2.4.1

* Add Django 3.1 support
* Upgrade linter versions of `flake8` and `black` to the latest

Page 2 of 7

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.