From 05ef51f710dad8f8036bc5acee4097db4adc0d71 Mon Sep 17 00:00:00 2001 From: Shane McDonald Date: Mon, 15 Feb 2021 17:10:43 -0500 Subject: [PATCH] Add migration to reset custom pod specs --- .../migrations/0127_reset_pod_spec_override.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 awx/main/migrations/0127_reset_pod_spec_override.py diff --git a/awx/main/migrations/0127_reset_pod_spec_override.py b/awx/main/migrations/0127_reset_pod_spec_override.py new file mode 100644 index 000000000000..c3ebe0b50431 --- /dev/null +++ b/awx/main/migrations/0127_reset_pod_spec_override.py @@ -0,0 +1,18 @@ +# Generated by Django 2.2.16 on 2021-02-15 22:02 + +from django.db import migrations + +def reset_pod_specs(apps, schema_editor): + InstanceGroup = apps.get_model('main', 'InstanceGroup') + InstanceGroup.objects.update(pod_spec_override="") + + +class Migration(migrations.Migration): + + dependencies = [ + ('main', '0126_executionenvironment_container_options'), + ] + + operations = [ + migrations.RunPython(reset_pod_specs) + ]