- Add support for Django 5.1.
- Drop support for Django 3.2, 4.0, 4.1.
- Convert
Safe
to be a custom class rather than anEnum
. - 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. - Rename internal enums for clarity and PEP8.
- Change the default safe marking to
Safe.always
. This gives a better default experience for working with third-party apps.
- Add
settings.SAFEMIGRATE = "disabled"
setting to disablesafemigrate
protections.
- Add support for Django 5.0.
- Add support for Python 3.12.
- Expand test matrix to all supported combinations of Django and Python.
- Add a pre-commit hook to ensure migrations have a safe attribute.
- 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.
- Add support for Django 4.0.
- Drop support for Django<3.
- Add support for Django 3.
The valid values for
safe
are:Safe.before_deploy
Safe.after_deploy
Safe.always
Import with
from django_safemigrate import Safe
.True
is nowSafe.before_deploy
, andFalse
is nowSafe.after_deploy
.The default safety marking, when unspecified, is now
Safe.after_deploy
, instead ofSafe.before_deploy
.Safe.always
allows for migrations that may be run either before or after deployment, because they don't require any database changes.Multiple dependent
Safe.after_deploy
migrations do not block deployment as long as there are no dependentSafe.before_deploy
migrations.Enforce that any given value of safe is valid.
- Initial Release