Opened 12 years ago
Closed 12 years ago
#22095 closed Bug (fixed)
Migrations containing RunPython operations cannot be reversed regardless of reverse_code
| Reported by: | andrewsg | Owned by: | andrewsg |
|---|---|---|---|
| Component: | Migrations | Version: | dev |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Ready for checkin | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
Migrations including RunPython cannot be reversed, regardless of whether reverse_code is supplied to RunPython. Code appears to be in place to make the reverse operation function if reverse_code is supplied, but the "reversible" attribute on the RunPython class is set to False.
RunSQL is analogous to RunPython and solves this problem by making reversible a property that returns True if reverse_sql is supplied to that constructor, so presumably the same would work for RunPython.
Change History (3)
comment:1 by , 12 years ago
| Has patch: | set |
|---|---|
| Owner: | set to |
| Status: | new → assigned |
comment:2 by , 12 years ago
| Triage Stage: | Unreviewed → Ready for checkin |
|---|
comment:3 by , 12 years ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
Fix supplied in PR: https://github.com/django/django/pull/2329