[2.2.x] Fixed #30870 -- Fixed showing that RunPython operations are irreversible by migrate --plan.

Thanks Hasan Ramezani for the initial patch and Kyle Dickerson for the
report.

Backport of 06d34aab7c from master.
This commit is contained in:
Mariusz Felisiak 2019-10-14 09:37:45 +02:00
parent d4d37d0900
commit d2f02aa56b
4 changed files with 53 additions and 5 deletions

View file

@ -0,0 +1,22 @@
from django.db import migrations
def grow_tail(x, y):
pass
def feed(x, y):
"""Feed salamander."""
pass
class Migration(migrations.Migration):
dependencies = [
('migrations', '0004_fourth'),
]
operations = [
migrations.RunPython(migrations.RunPython.noop),
migrations.RunPython(grow_tail),
migrations.RunPython(feed, migrations.RunPython.noop),
]