mirror of
https://github.com/ansible/awx.git
synced 2026-03-08 21:19:26 -02:30
Data migration to remove the isolated instances from the database
This commit is contained in:
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),
|
||||||
|
]
|
||||||
Reference in New Issue
Block a user