Releases: 3YOURMIND/django-migration-linter
Releases · 3YOURMIND/django-migration-linter
6.0.0
Feature:
- Breaking change: Handle custom Django app label when gathering migrations from git reference. (#262)
This means that, an app that was previously referenced by its folder name, will now be referenced by its Django app label.
Bug:
- Consider
DEFAULT NULLas no default value being defined (#302)
Miscellaneous:
5.2.0
Feature:
- Allow ignoring all initial migrations, with
--ignore-initial-migrations
Bug:
- Don't detect an index creation during a transaction with an exclusive lock, when the table is being created (#264)
Miscellaneous:
- Add support for Python 3.13
- Add support for Django 5.1
- Drop support for Python 3.7 and 3.8
- Mark md5 hashing as not used for security
5.1.0
Feature:
- Support Django 5.0
db_defaultattribute (issue #275) - Allow ignoring the failures of
sqlmigratecommands, with--ignore-sqlmigrate-errorsoption (issue #274)
Bug:
- Don't detect 'IS NOT NULL' as backward incompatible changes (issue #263)
- Don't consider UNIQUE INDEX creation as making a column not nullable
Miscellaneous:
- Migrated from
setup.pyandsetup.cfgtopyproject.toml - Add support for Python 3.12
- Add support for Django 5.0
- Avoid git command injections
- Remove Codecov integration
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
RunPythonmodel import check when using athroughobject likeMyModel.many_to_many.through.objects.filter(...)(issue #218) - Mark the
IgnoreMigrationoperation aselidable=True - Handle
functools.partialfunctions in RunPython data migrations - Add a new check,
CREATE_INDEX_EXCLUSIVEto 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
mypyandruffusages
4.1.0
- Allow configuring logging for
makemigrationscommand and unify behaviour withlintmigrations(issue #207) - Adapt
--warnings-as-errorsoption to allow selecting some migration tests only (issue #201) - Add
sql_analyseroption tomakemigrationsin order to specify the SQL analyser to use (issue #208) - Make
project_root_pathandverbosityconfigurable from other setting source (issue #203)
4.0.0
- Drop support for Python 2.7, 3.5 and 3.6
- Add support for Python 3.10
- Drop support for Django 1.11, 2.0, 2.1, 3.0 and 3.1
- Add support for Django 4.0
- Fix index creation detection when table is being created in the transaction (issue #178)
- Handle unique index creation as adding a unique constraint (issue #183)
- Allow any option to be set/unset in config file (issue #167)
- Allow using Django settings for any option to be set/unset (issue #198)
- Raise when unsupported database vendor, allow passing an option to select SQL analyser (issue #138 and #169
3.0.1
Fixed bug:
- Setting a field as NOT NULL without default passed the linter.
3.0.0
Breaking API change on lintmigrations command:
- the positional argument
GIT_COMMIT_IDbecomes an optional argument with the named parameter--git-commit-id [GIT_COMMIT_ID] - the
lintmigrationscommand 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
tomlconfiguration files - Handle
--verbosity 0or-v 0correctly to not print anything from the linter - Add code coverage to the linter
- Renamed
masterbranch tomain
2.5.3
- Stop packaging the 'tests' module into the release wheel file
- Add Django 3.2 support
2.5.2
- Remove
tomlsupport for config files