0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-11-29 17:36:49 +01:00

Add no-op reverse migration callable for 0004

Allow it to be reversed.
This commit is contained in:
benjaoming 2015-12-28 02:15:51 +01:00 committed by Karl Hobley
parent cda667a544
commit 074bdabcff

View File

@ -42,6 +42,11 @@ def remove_duplicate_renditions(apps, schema_editor):
""")
def reverse_remove_duplicate_renditions(*args, **kwargs):
"""This is a no-op. The migration removes duplicates, we cannot recreate those duplicates."""
pass
class Migration(migrations.Migration):
dependencies = [
@ -49,7 +54,7 @@ class Migration(migrations.Migration):
]
operations = [
migrations.RunPython(remove_duplicate_renditions),
migrations.RunPython(remove_duplicate_renditions, reverse_remove_duplicate_renditions),
migrations.AlterField(
model_name='rendition',