mirror of
https://github.com/wagtail/wagtail.git
synced 2024-12-01 11:41:20 +01:00
Add no-op reverse migration callable for 0004
Allow it to be reversed.
This commit is contained in:
parent
cda667a544
commit
074bdabcff
@ -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):
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
@ -49,7 +54,7 @@ class Migration(migrations.Migration):
|
|||||||
]
|
]
|
||||||
|
|
||||||
operations = [
|
operations = [
|
||||||
migrations.RunPython(remove_duplicate_renditions),
|
migrations.RunPython(remove_duplicate_renditions, reverse_remove_duplicate_renditions),
|
||||||
|
|
||||||
migrations.AlterField(
|
migrations.AlterField(
|
||||||
model_name='rendition',
|
model_name='rendition',
|
||||||
|
Loading…
Reference in New Issue
Block a user