Opened 8 years ago
Closed 8 years ago
#26588 closed Bug (duplicate)
Unable to reverse a run_before that refers to django.contrib.auth
Reported by: | Matthew Schinckel | Owned by: | nobody |
---|---|---|---|
Component: | Migrations | Version: | 1.9 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
You can use run_before
to ensure that something else runs before django.contrib.auth
(specifically ('auth', '0001_initial')
, but if you try to reverse that migration, a signal fires that tries to update permissions.
Since this will run after auth_permission
has been dropped, it will result in a database error.
Change History (4)
comment:1 by , 8 years ago
comment:2 by , 8 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:3 by , 8 years ago
Yeah, the behaviour is the same as migrating auth to zero. I'd missed that (my test obviously didn't unmigrate that app, only the one I was testing, which when I put the run_before cascaded to migrating auth to zero).
comment:4 by , 8 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
Closing as duplicate of #24075.
I have a minimal example at https://bitbucket.org/schinckel/runs_before/src
Not sure how to write up a nice django test case for this though.