mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 11:20:39 -03:30
Data migration to remove the isolated instances from the database
This commit is contained in:
parent
19d000e97f
commit
7b47d7e7f6
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