mirror of
https://github.com/ansible/awx.git
synced 2026-05-09 02:17:37 -02:30
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:
@@ -9,12 +9,6 @@ def remove_iso_instances(apps, schema_editor):
|
|||||||
Instance.objects.filter(rampart_groups__controller__isnull=False).delete()
|
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):
|
class Migration(migrations.Migration):
|
||||||
atomic = False
|
atomic = False
|
||||||
|
|
||||||
@@ -24,7 +18,6 @@ class Migration(migrations.Migration):
|
|||||||
|
|
||||||
operations = [
|
operations = [
|
||||||
migrations.RunPython(remove_iso_instances),
|
migrations.RunPython(remove_iso_instances),
|
||||||
migrations.RunPython(remove_iso_groups),
|
|
||||||
migrations.RemoveField(
|
migrations.RemoveField(
|
||||||
model_name='instance',
|
model_name='instance',
|
||||||
name='last_isolated_check',
|
name='last_isolated_check',
|
||||||
|
|||||||
Reference in New Issue
Block a user