migrations: Add missing elidable tags on RunPython/RunSQL steps.

This helps the squashmigrations tool know that it can squash these.
This commit is contained in:
Tim Abbott
2024-08-13 09:31:43 -07:00
parent 5188cf3d8e
commit afecb2eca6
40 changed files with 74 additions and 28 deletions

View File

@@ -32,5 +32,6 @@ class Migration(migrations.Migration):
# The updated table is still valid with the old schema;
# so to reverse, a no-op suffices.
reverse_sql=[],
elidable=True,
),
]

View File

@@ -49,7 +49,9 @@ class Migration(migrations.Migration):
]
operations = [
migrations.RunPython(clear_duplicate_counts, reverse_code=migrations.RunPython.noop),
migrations.RunPython(
clear_duplicate_counts, reverse_code=migrations.RunPython.noop, elidable=True
),
migrations.AddConstraint(
model_name="remoteinstallationcount",
constraint=models.UniqueConstraint(

View File

@@ -35,5 +35,7 @@ class Migration(migrations.Migration):
name="plan_type",
field=models.PositiveSmallIntegerField(default=PLAN_TYPE_SELF_MANAGED),
),
migrations.RunPython(renumber_plan_types, reverse_code=migrations.RunPython.noop),
migrations.RunPython(
renumber_plan_types, reverse_code=migrations.RunPython.noop, elidable=True
),
]