mirror of
https://github.com/ansible/awx.git
synced 2026-01-09 23:12:08 -03:30
Merge pull request #10174 from jbradberry/remove-isolated-instances
Data migration to remove the isolated instances from the database
SUMMARY
ISSUE TYPE
Feature Pull Request
COMPONENT NAME
API
AWX VERSION
ADDITIONAL INFORMATION
Reviewed-by: Elyézer Rezende <None>
Reviewed-by: Alan Rominger <arominge@redhat.com>
This commit is contained in:
commit
e970620672
19
awx/main/migrations/0141_remove_isolated_instances.py
Normal file
19
awx/main/migrations/0141_remove_isolated_instances.py
Normal file
@ -0,0 +1,19 @@
|
||||
# Generated by Django 2.2.16 on 2021-05-11 19:38
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
def forwards(apps, schema_editor):
|
||||
Instance = apps.get_model('main', 'Instance')
|
||||
Instance.objects.filter(version__startswith='ansible-runner-').delete()
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('main', '0140_rename'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RunPython(forwards),
|
||||
]
|
||||
Loading…
x
Reference in New Issue
Block a user