Revert removing the old isolated groups

In 4.1+ / AAP 2.1+, isolated groups should be converted into plain
instance groups, and it's desirable for the old ones to stick around
since they'll likely be tied to a bunch of job templates.  We do not
want to make the users have to reconstruct those relationships.
This commit is contained in:
Jeff Bradberry 2021-10-08 11:53:21 -04:00
parent 6a2826b91c
commit 15fd22681d

View File

@ -9,12 +9,6 @@ def remove_iso_instances(apps, schema_editor):
Instance.objects.filter(rampart_groups__controller__isnull=False).delete()
def remove_iso_groups(apps, schema_editor):
InstanceGroup = apps.get_model('main', 'InstanceGroup')
with transaction.atomic():
InstanceGroup.objects.filter(controller__isnull=False).delete()
class Migration(migrations.Migration):
atomic = False
@ -24,7 +18,6 @@ class Migration(migrations.Migration):
operations = [
migrations.RunPython(remove_iso_instances),
migrations.RunPython(remove_iso_groups),
migrations.RemoveField(
model_name='instance',
name='last_isolated_check',