From cf17373b3f96fae1038eb180d374ddc86fedfcad Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 5 Mar 2020 11:35:00 +0100 Subject: [PATCH] Fix ahmed introduced migrations Signed-off-by: Nico Schottelius --- uncloud/uncloud_vm/migrations/0001_initial.py | 14 +++++++---- .../migrations/0009_auto_20200303_0927.py | 23 ------------------- .../migrations/0010_auto_20200303_1208.py | 18 --------------- .../0011_vmdiskimageproduct_source_type.py | 18 --------------- .../0012_vmdiskimageproduct_source.py | 18 --------------- .../migrations/0013_auto_20200303_1845.py | 23 ------------------- .../migrations/0014_vmproduct_vmid.py | 18 --------------- 7 files changed, 9 insertions(+), 123 deletions(-) delete mode 100644 uncloud/uncloud_vm/migrations/0009_auto_20200303_0927.py delete mode 100644 uncloud/uncloud_vm/migrations/0010_auto_20200303_1208.py delete mode 100644 uncloud/uncloud_vm/migrations/0011_vmdiskimageproduct_source_type.py delete mode 100644 uncloud/uncloud_vm/migrations/0012_vmdiskimageproduct_source.py delete mode 100644 uncloud/uncloud_vm/migrations/0013_auto_20200303_1845.py delete mode 100644 uncloud/uncloud_vm/migrations/0014_vmproduct_vmid.py diff --git a/uncloud/uncloud_vm/migrations/0001_initial.py b/uncloud/uncloud_vm/migrations/0001_initial.py index 6c3d54f..f9f40d8 100644 --- a/uncloud/uncloud_vm/migrations/0001_initial.py +++ b/uncloud/uncloud_vm/migrations/0001_initial.py @@ -1,4 +1,4 @@ -# Generated by Django 3.0.3 on 2020-03-03 16:50 +# Generated by Django 3.0.3 on 2020-03-05 10:34 from django.conf import settings from django.db import migrations, models @@ -11,7 +11,7 @@ class Migration(migrations.Migration): initial = True dependencies = [ - ('uncloud_pay', '__first__'), + ('uncloud_pay', '0001_initial'), migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] @@ -25,6 +25,8 @@ class Migration(migrations.Migration): ('is_public', models.BooleanField(default=False)), ('size_in_gb', models.FloatField(blank=True, null=True)), ('import_url', models.URLField(blank=True, null=True)), + ('image_source', models.CharField(max_length=128, null=True)), + ('image_source_type', models.CharField(max_length=128, null=True)), ('storage_class', models.CharField(choices=[('hdd', 'HDD'), ('ssd', 'SSD')], default='ssd', max_length=32)), ('status', models.CharField(choices=[('pending', 'Pending'), ('creating', 'Creating'), ('active', 'Active'), ('disabled', 'Disabled'), ('unusable', 'Unusable'), ('deleted', 'Deleted')], default='pending', max_length=32)), ('owner', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), @@ -39,16 +41,18 @@ class Migration(migrations.Migration): ('usable_cores', models.IntegerField(default=0)), ('usable_ram_in_gb', models.FloatField(default=0)), ('status', models.CharField(choices=[('pending', 'Pending'), ('creating', 'Creating'), ('active', 'Active'), ('disabled', 'Disabled'), ('unusable', 'Unusable'), ('deleted', 'Deleted')], default='pending', max_length=32)), + ('vms', models.TextField(default='')), ], ), migrations.CreateModel( name='VMProduct', fields=[ ('uuid', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), - ('status', models.CharField(choices=[('pending', 'Pending'), ('being_created', 'Being created'), ('active', 'Active'), ('deleted', 'Deleted')], default='pending', max_length=256)), + ('status', models.CharField(choices=[('PENDING', 'Pending'), ('AWAITING_PAYMENT', 'Awaiting payment'), ('BEING_CREATED', 'Being created'), ('ACTIVE', 'Active'), ('DELETED', 'Deleted')], default='PENDING', max_length=32)), ('name', models.CharField(max_length=32)), ('cores', models.IntegerField()), ('ram_in_gb', models.FloatField()), + ('vmid', models.IntegerField(null=True)), ('order', models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, to='uncloud_pay.Order')), ('owner', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), ('vmhost', models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, to='uncloud_vm.VMHost')), @@ -71,7 +75,7 @@ class Migration(migrations.Migration): name='VMSnapshotProduct', fields=[ ('uuid', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), - ('status', models.CharField(choices=[('pending', 'Pending'), ('being_created', 'Being created'), ('active', 'Active'), ('deleted', 'Deleted')], default='pending', max_length=256)), + ('status', models.CharField(choices=[('PENDING', 'Pending'), ('AWAITING_PAYMENT', 'Awaiting payment'), ('BEING_CREATED', 'Being created'), ('ACTIVE', 'Active'), ('DELETED', 'Deleted')], default='PENDING', max_length=32)), ('gb_ssd', models.FloatField(editable=False)), ('gb_hdd', models.FloatField(editable=False)), ('order', models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, to='uncloud_pay.Order')), @@ -86,7 +90,7 @@ class Migration(migrations.Migration): name='VMNetworkCard', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('mac_address', models.IntegerField()), + ('mac_address', models.BigIntegerField()), ('ip_address', models.GenericIPAddressField(blank=True, null=True)), ('vm', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='uncloud_vm.VMProduct')), ], diff --git a/uncloud/uncloud_vm/migrations/0009_auto_20200303_0927.py b/uncloud/uncloud_vm/migrations/0009_auto_20200303_0927.py deleted file mode 100644 index 7815f46..0000000 --- a/uncloud/uncloud_vm/migrations/0009_auto_20200303_0927.py +++ /dev/null @@ -1,23 +0,0 @@ -# Generated by Django 3.0.3 on 2020-03-03 09:27 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('uncloud_vm', '0008_auto_20200229_1611'), - ] - - operations = [ - migrations.AddField( - model_name='vmhost', - name='vms', - field=models.TextField(default=''), - ), - migrations.AlterField( - model_name='vmdiskproduct', - name='size_in_gb', - field=models.FloatField(blank=True), - ), - ] diff --git a/uncloud/uncloud_vm/migrations/0010_auto_20200303_1208.py b/uncloud/uncloud_vm/migrations/0010_auto_20200303_1208.py deleted file mode 100644 index 39a20e3..0000000 --- a/uncloud/uncloud_vm/migrations/0010_auto_20200303_1208.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 3.0.3 on 2020-03-03 12:08 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('uncloud_vm', '0009_auto_20200303_0927'), - ] - - operations = [ - migrations.AlterField( - model_name='vmnetworkcard', - name='mac_address', - field=models.BigIntegerField(), - ), - ] diff --git a/uncloud/uncloud_vm/migrations/0011_vmdiskimageproduct_source_type.py b/uncloud/uncloud_vm/migrations/0011_vmdiskimageproduct_source_type.py deleted file mode 100644 index 3d445cf..0000000 --- a/uncloud/uncloud_vm/migrations/0011_vmdiskimageproduct_source_type.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 3.0.3 on 2020-03-03 18:33 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('uncloud_vm', '0010_auto_20200303_1208'), - ] - - operations = [ - migrations.AddField( - model_name='vmdiskimageproduct', - name='source_type', - field=models.CharField(max_length=128, null=True), - ), - ] diff --git a/uncloud/uncloud_vm/migrations/0012_vmdiskimageproduct_source.py b/uncloud/uncloud_vm/migrations/0012_vmdiskimageproduct_source.py deleted file mode 100644 index 4072d82..0000000 --- a/uncloud/uncloud_vm/migrations/0012_vmdiskimageproduct_source.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 3.0.3 on 2020-03-03 18:35 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('uncloud_vm', '0011_vmdiskimageproduct_source_type'), - ] - - operations = [ - migrations.AddField( - model_name='vmdiskimageproduct', - name='source', - field=models.CharField(max_length=128, null=True), - ), - ] diff --git a/uncloud/uncloud_vm/migrations/0013_auto_20200303_1845.py b/uncloud/uncloud_vm/migrations/0013_auto_20200303_1845.py deleted file mode 100644 index 55aed73..0000000 --- a/uncloud/uncloud_vm/migrations/0013_auto_20200303_1845.py +++ /dev/null @@ -1,23 +0,0 @@ -# Generated by Django 3.0.3 on 2020-03-03 18:45 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('uncloud_vm', '0012_vmdiskimageproduct_source'), - ] - - operations = [ - migrations.RenameField( - model_name='vmdiskimageproduct', - old_name='source', - new_name='image_source', - ), - migrations.RenameField( - model_name='vmdiskimageproduct', - old_name='source_type', - new_name='image_source_type', - ), - ] diff --git a/uncloud/uncloud_vm/migrations/0014_vmproduct_vmid.py b/uncloud/uncloud_vm/migrations/0014_vmproduct_vmid.py deleted file mode 100644 index 4f43f77..0000000 --- a/uncloud/uncloud_vm/migrations/0014_vmproduct_vmid.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 3.0.3 on 2020-03-04 07:52 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('uncloud_vm', '0013_auto_20200303_1845'), - ] - - operations = [ - migrations.AddField( - model_name='vmproduct', - name='vmid', - field=models.IntegerField(null=True), - ), - ]