Django-safemigrate

Latest version: v5.1

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

Scan your dependencies

Page 1 of 2

5.1

++++++++++++++++

* Declared the default auto field for the app to ``BigAutoField``.
This avoids issues where projects that have their ``DEFAULT_AUTO_FIELD``
set to ``"django.db.models.AutoField"``
from seeing this app as needing migrations generated.
``django.db.models.AutoField`` is the default auto field
if the setting is not set,
but newly generated projects
automatically set it to ``django.db.models.BigAutoField``.

5.0

++++++++++++++++

Breaking Changes:

* Drop support for Django 3.2, 4.0, 4.1.
* Change the default safe marking to ``Safe.always``.
This gives a better default experience for working with third-party apps.
* Disallow faking migrations when using ``safemigrate``.
* ``Safe.after_deploy`` and ``Safe.always`` migrations will be
reported as blocked if they are behind a blocked ``Safe.before_deploy``
migration.
* ``Safe.after_deploy`` migrations are now reported along with other
delayed migrations instead of being separately reported as protected.

Other improvements:

* Add support for Django 5.1 and 5.2.
* Add support for Python 3.13.
* The standard values for ``safe`` are now methods that may be called:

* ``Safe.before_deploy()``
* ``Safe.after_deploy()``
* ``Safe.always()``
* Add support for allowing a ``Safe.after_deploy(delay=timedelta())``
migration to be migrated after the delay has passed.
* Convert ``Safe`` to be a custom class rather than an ``Enum``.
* Rename internal enums for clarity and PEP 8 alignment.
* Use ``uv`` as the build tool.

4.3

++++++++++++++++

* Add ``settings.SAFEMIGRATE = "disabled"`` setting to disable ``safemigrate``
protections.

4.2

++++++++++++++++

* Add support for Django 5.0.
* Add support for Python 3.12.
* Expand test matrix to all supported combinations of Django and Python.

4.1

++++++++++++++++

* Add a pre-commit hook to ensure migrations have a safe attribute.

4.0

++++++++++++++++

* Add support for Django 4.1, 4.2.
* Add support for Python 3.11.
* Drop support for Django 3.0, 3.1.
* Drop support for Python 3.6, 3.7.

Page 1 of 2

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.