diff options
Diffstat (limited to 'src/api/migrations/0011_auto_20200218_1536.py')
-rw-r--r-- | src/api/migrations/0011_auto_20200218_1536.py | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/src/api/migrations/0011_auto_20200218_1536.py b/src/api/migrations/0011_auto_20200218_1536.py index a399495..0fd7029 100644 --- a/src/api/migrations/0011_auto_20200218_1536.py +++ b/src/api/migrations/0011_auto_20200218_1536.py @@ -3,14 +3,6 @@ from django.db import migrations, models -def set_resource_id(apps, schema_editor): - for cls in ["HardwareConfig", "NetworkConfig", "SnapshotConfig"]: - model = apps.get_model('api', cls) - for m in model.objects.all(): - m.resource_id = m.host.labid - m.save() - - class Migration(migrations.Migration): dependencies = [ @@ -34,21 +26,4 @@ class Migration(migrations.Migration): name='resource_id', field=models.CharField(default='default_id', max_length=200), ), - migrations.RunPython(set_resource_id), - migrations.RemoveField( - model_name='hosthardwarerelation', - name='host', - ), - migrations.RemoveField( - model_name='hostnetworkrelation', - name='host', - ), - migrations.RemoveField( - model_name='snapshotconfig', - name='host', - ), - migrations.RemoveField( - model_name='opnfvapiconfig', - name='roles', - ), ] |