Remove the managed flag from all existing EEs

This flag henceforth is going to be used only for the "control plane"
execution environments, which sysadmins will not be allowed to alter.
This commit is contained in:
Jeff Bradberry 2021-06-07 15:43:57 -04:00
parent 87dcc49429
commit d4d21a1511

View File

@ -0,0 +1,21 @@
# Generated by Django 2.2.16 on 2021-06-07 19:36
from django.db import migrations
def forwards(apps, schema_editor):
ExecutionEnvironment = apps.get_model('main', 'ExecutionEnvironment')
for row in ExecutionEnvironment.objects.filter(managed_by_tower=True):
row.managed_by_tower = False
row.save(update_fields=['managed_by_tower'])
class Migration(migrations.Migration):
dependencies = [
('main', '0144_event_partitions'),
]
operations = [
migrations.RunPython(forwards),
]