Migrations containing RunPython operations cannot be reversed regardless of reverse_code
|Reported by:||andrewsg||Owned by:||andrewsg|
|Cc:||Triage Stage:||Ready for checkin|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
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.