migrations not reversible
kostrom opened this issue · comments
During a deployment roll-back, we encountered an irreversible operation exception from django-axes. I had to --fake to rollback 0007
axes/migrations/0007_alter_accessattempt_unique_together.py
line 38 should be
migrations.RunPython(deduplicate_attempts, reverse_code=migrations.reverse_code=migrations.RunPython.noop),
The migration removes some duplicates. When rolling back, it's not necessary (or possible) to restore the duplicates, so the backwards migration should just be a noop.
I tried to make a MR but permission denied to submit the branch.
Also, I'm not sure how to run the tests. Does it expect me to configure a django project in the environment first?
Hi @kostrom, did you get the project up and running?
You should be able to make a PR from either GitHub desktop and/or by forking the repository and opening a PR from there, those two options are probably the easiest ones.
Documentation has a section on the development setup but GitHub Actions also runs the full test matrix with all supported Python and Django versions on a fresh PR push:
https://django-axes.readthedocs.io/en/latest/9_contributing.html#development