diff --git a/uncloud/uncloud_auth/migrations/0001_initial.py b/uncloud/uncloud_auth/migrations/0001_initial.py index 63885c4..a1f8d00 100644 --- a/uncloud/uncloud_auth/migrations/0001_initial.py +++ b/uncloud/uncloud_auth/migrations/0001_initial.py @@ -1,4 +1,4 @@ -# Generated by Django 3.0.3 on 2020-02-23 17:11 +# Generated by Django 3.0.3 on 2020-03-03 16:49 import django.contrib.auth.models import django.contrib.auth.validators diff --git a/uncloud/uncloud_net/migrations/__init__.py b/uncloud/uncloud_net/migrations/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/uncloud/uncloud_pay/migrations/0001_initial.py b/uncloud/uncloud_pay/migrations/0001_initial.py index 6e57c59..f99021a 100644 --- a/uncloud/uncloud_pay/migrations/0001_initial.py +++ b/uncloud/uncloud_pay/migrations/0001_initial.py @@ -1,4 +1,4 @@ -# Generated by Django 3.0.3 on 2020-02-27 10:50 +# Generated by Django 3.0.3 on 2020-03-03 16:50 from django.conf import settings import django.core.validators @@ -19,13 +19,24 @@ class Migration(migrations.Migration): migrations.CreateModel( name='Bill', fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('creation_date', models.DateTimeField()), + ('uuid', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), + ('creation_date', models.DateTimeField(auto_now_add=True)), ('starting_date', models.DateTimeField()), ('ending_date', models.DateTimeField()), ('due_date', models.DateField()), - ('paid', models.BooleanField(default=False)), ('valid', models.BooleanField(default=True)), + ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), + ], + ), + migrations.CreateModel( + name='Order', + fields=[ + ('uuid', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), + ('creation_date', models.DateTimeField(auto_now_add=True)), + ('starting_date', models.DateTimeField(auto_now_add=True)), + ('ending_date', models.DateTimeField(blank=True, null=True)), + ('recurring_period', models.CharField(choices=[('ONCE', 'Onetime'), ('YEAR', 'Per Year'), ('MONTH', 'Per Month'), ('MINUTE', 'Per Minute'), ('DAY', 'Per Day'), ('HOUR', 'Per Hour'), ('SECOND', 'Per Second')], default='MONTH', max_length=32)), + ('bill', models.ManyToManyField(blank=True, editable=False, to='uncloud_pay.Bill')), ('owner', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), ], ), @@ -34,23 +45,33 @@ class Migration(migrations.Migration): fields=[ ('uuid', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), ('amount', models.DecimalField(decimal_places=2, default=0.0, max_digits=10, validators=[django.core.validators.MinValueValidator(0)])), - ('source', models.CharField(choices=[('wire', 'Wire Transfer'), ('strip', 'Stripe'), ('voucher', 'Voucher'), ('referral', 'Referral'), ('unknown', 'Unknown')], default='unknown', max_length=256)), - ('timestamp', models.DateTimeField(editable=False)), - ('owner', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), + ('source', models.CharField(choices=[('wire', 'Wire Transfer'), ('stripe', 'Stripe'), ('voucher', 'Voucher'), ('referral', 'Referral'), ('unknown', 'Unknown')], default='unknown', max_length=256)), + ('timestamp', models.DateTimeField(auto_now_add=True)), + ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), ], ), migrations.CreateModel( - name='Order', + name='OrderRecord', fields=[ - ('uuid', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), - ('creation_date', models.DateTimeField()), - ('starting_date', models.DateTimeField()), - ('ending_date', models.DateTimeField(blank=True, null=True)), - ('recurring_price', models.FloatField(editable=False)), - ('one_time_price', models.FloatField(editable=False)), - ('recurring_period', models.CharField(choices=[('onetime', 'Onetime'), ('per_year', 'Per Year'), ('per_month', 'Per Month'), ('per_week', 'Per Week'), ('per_day', 'Per Day'), ('per_hour', 'Per Hour'), ('per_minute', 'Per Minute'), ('per_second', 'Per Second')], default='onetime', max_length=32)), - ('bill', models.ManyToManyField(blank=True, editable=False, null=True, to='uncloud_pay.Bill')), - ('owner', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('setup_fee', models.DecimalField(decimal_places=2, default=0.0, max_digits=10, validators=[django.core.validators.MinValueValidator(0)])), + ('recurring_price', models.DecimalField(decimal_places=2, default=0.0, max_digits=10, validators=[django.core.validators.MinValueValidator(0)])), + ('description', models.TextField()), + ('order', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='uncloud_pay.Order')), ], ), + migrations.CreateModel( + name='PaymentMethod', + fields=[ + ('uuid', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), + ('source', models.CharField(choices=[('stripe', 'Stripe'), ('unknown', 'Unknown')], default='stripe', max_length=256)), + ('description', models.TextField()), + ('primary', models.BooleanField(default=True)), + ('stripe_card_id', models.CharField(blank=True, max_length=32, null=True)), + ('owner', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), + ], + options={ + 'unique_together': {('owner', 'primary')}, + }, + ), ] diff --git a/uncloud/uncloud_pay/migrations/0002_auto_20200227_1230.py b/uncloud/uncloud_pay/migrations/0002_auto_20200227_1230.py deleted file mode 100644 index 0643e9a..0000000 --- a/uncloud/uncloud_pay/migrations/0002_auto_20200227_1230.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 3.0.3 on 2020-02-27 12:30 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('uncloud_pay', '0001_initial'), - ] - - operations = [ - migrations.AlterField( - model_name='payment', - name='source', - field=models.CharField(choices=[('wire', 'Wire Transfer'), ('stripe', 'Stripe'), ('voucher', 'Voucher'), ('referral', 'Referral'), ('unknown', 'Unknown')], default='unknown', max_length=256), - ), - ] diff --git a/uncloud/uncloud_pay/migrations/0002_auto_20200227_1404.py b/uncloud/uncloud_pay/migrations/0002_auto_20200227_1404.py deleted file mode 100644 index 4a6e776..0000000 --- a/uncloud/uncloud_pay/migrations/0002_auto_20200227_1404.py +++ /dev/null @@ -1,32 +0,0 @@ -# Generated by Django 3.0.3 on 2020-02-27 14:04 - -from django.conf import settings -from django.db import migrations, models -import django.db.models.deletion -import uuid - - -class Migration(migrations.Migration): - - dependencies = [ - migrations.swappable_dependency(settings.AUTH_USER_MODEL), - ('uncloud_pay', '0001_initial'), - ] - - operations = [ - migrations.AlterField( - model_name='payment', - name='source', - field=models.CharField(choices=[('wire', 'Wire Transfer'), ('stripe', 'Stripe'), ('voucher', 'Voucher'), ('referral', 'Referral'), ('unknown', 'Unknown')], default='unknown', max_length=256), - ), - migrations.CreateModel( - name='PaymentMethod', - fields=[ - ('uuid', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), - ('source', models.CharField(choices=[('stripe', 'Stripe'), ('unknown', 'Unknown')], default='stripe', max_length=256)), - ('description', models.TextField()), - ('default', models.BooleanField()), - ('owner', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), - ], - ), - ] diff --git a/uncloud/uncloud_pay/migrations/0003_auto_20200227_1414.py b/uncloud/uncloud_pay/migrations/0003_auto_20200227_1414.py deleted file mode 100644 index 1e16235..0000000 --- a/uncloud/uncloud_pay/migrations/0003_auto_20200227_1414.py +++ /dev/null @@ -1,28 +0,0 @@ -# Generated by Django 3.0.3 on 2020-02-27 14:14 - -from django.conf import settings -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - migrations.swappable_dependency(settings.AUTH_USER_MODEL), - ('uncloud_pay', '0002_auto_20200227_1404'), - ] - - operations = [ - migrations.AddField( - model_name='paymentmethod', - name='primary', - field=models.BooleanField(default=True), - ), - migrations.AlterUniqueTogether( - name='paymentmethod', - unique_together={('owner', 'primary')}, - ), - migrations.RemoveField( - model_name='paymentmethod', - name='default', - ), - ] diff --git a/uncloud/uncloud_pay/migrations/0004_auto_20200227_1532.py b/uncloud/uncloud_pay/migrations/0004_auto_20200227_1532.py deleted file mode 100644 index f26b498..0000000 --- a/uncloud/uncloud_pay/migrations/0004_auto_20200227_1532.py +++ /dev/null @@ -1,31 +0,0 @@ -# Generated by Django 3.0.3 on 2020-02-27 15:32 - -from django.conf import settings -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - dependencies = [ - migrations.swappable_dependency(settings.AUTH_USER_MODEL), - ('uncloud_pay', '0003_auto_20200227_1414'), - ] - - operations = [ - migrations.AlterField( - model_name='bill', - name='owner', - field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL), - ), - migrations.AlterField( - model_name='order', - name='recurring_period', - field=models.CharField(choices=[('ONCE', 'Onetime'), ('YEAR', 'Per Year'), ('MONTH', 'Per Month'), ('MINUTE', 'Per Minute'), ('DAY', 'Per Day'), ('HOUR', 'Per Hour'), ('SECOND', 'Per Second')], default='MONTH', max_length=32), - ), - migrations.AlterField( - model_name='payment', - name='owner', - field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL), - ), - ] diff --git a/uncloud/uncloud_pay/migrations/0005_auto_20200228_0737.py b/uncloud/uncloud_pay/migrations/0005_auto_20200228_0737.py deleted file mode 100644 index c646724..0000000 --- a/uncloud/uncloud_pay/migrations/0005_auto_20200228_0737.py +++ /dev/null @@ -1,42 +0,0 @@ -# Generated by Django 3.0.3 on 2020-02-28 07:37 - -from django.db import migrations, models -import uuid - - -class Migration(migrations.Migration): - - dependencies = [ - ('uncloud_pay', '0004_auto_20200227_1532'), - ] - - operations = [ - migrations.RemoveField( - model_name='bill', - name='id', - ), - migrations.RemoveField( - model_name='bill', - name='paid', - ), - migrations.AddField( - model_name='bill', - name='uuid', - field=models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False), - ), - migrations.AlterField( - model_name='bill', - name='creation_date', - field=models.DateTimeField(auto_now_add=True), - ), - migrations.AlterField( - model_name='order', - name='creation_date', - field=models.DateTimeField(auto_now_add=True), - ), - migrations.AlterField( - model_name='order', - name='starting_date', - field=models.DateTimeField(auto_now_add=True), - ), - ] diff --git a/uncloud/uncloud_pay/migrations/0006_auto_20200228_0741.py b/uncloud/uncloud_pay/migrations/0006_auto_20200228_0741.py deleted file mode 100644 index ef03bda..0000000 --- a/uncloud/uncloud_pay/migrations/0006_auto_20200228_0741.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 3.0.3 on 2020-02-28 07:41 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('uncloud_pay', '0005_auto_20200228_0737'), - ] - - operations = [ - migrations.AlterField( - model_name='order', - name='bill', - field=models.ManyToManyField(blank=True, editable=False, to='uncloud_pay.Bill'), - ), - ] diff --git a/uncloud/uncloud_pay/migrations/0007_remove_order_bill.py b/uncloud/uncloud_pay/migrations/0007_remove_order_bill.py deleted file mode 100644 index ea79416..0000000 --- a/uncloud/uncloud_pay/migrations/0007_remove_order_bill.py +++ /dev/null @@ -1,17 +0,0 @@ -# Generated by Django 3.0.3 on 2020-02-28 07:44 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('uncloud_pay', '0006_auto_20200228_0741'), - ] - - operations = [ - migrations.RemoveField( - model_name='order', - name='bill', - ), - ] diff --git a/uncloud/uncloud_pay/migrations/0008_order_bill.py b/uncloud/uncloud_pay/migrations/0008_order_bill.py deleted file mode 100644 index 315ac60..0000000 --- a/uncloud/uncloud_pay/migrations/0008_order_bill.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 3.0.3 on 2020-02-28 07:44 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('uncloud_pay', '0007_remove_order_bill'), - ] - - operations = [ - migrations.AddField( - model_name='order', - name='bill', - field=models.ManyToManyField(blank=True, editable=False, to='uncloud_pay.Bill'), - ), - ] diff --git a/uncloud/uncloud_pay/migrations/0009_auto_20200228_0825.py b/uncloud/uncloud_pay/migrations/0009_auto_20200228_0825.py deleted file mode 100644 index 66feb51..0000000 --- a/uncloud/uncloud_pay/migrations/0009_auto_20200228_0825.py +++ /dev/null @@ -1,29 +0,0 @@ -# Generated by Django 3.0.3 on 2020-02-28 08:25 - -import django.core.validators -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('uncloud_pay', '0008_order_bill'), - ] - - operations = [ - migrations.AlterField( - model_name='order', - name='one_time_price', - field=models.DecimalField(decimal_places=2, editable=False, max_digits=10, validators=[django.core.validators.MinValueValidator(0)]), - ), - migrations.AlterField( - model_name='order', - name='recurring_price', - field=models.DecimalField(decimal_places=2, editable=False, max_digits=10, validators=[django.core.validators.MinValueValidator(0)]), - ), - migrations.AlterField( - model_name='payment', - name='timestamp', - field=models.DateTimeField(auto_now_add=True), - ), - ] diff --git a/uncloud/uncloud_pay/migrations/0010_merge_20200228_1303.py b/uncloud/uncloud_pay/migrations/0010_merge_20200228_1303.py deleted file mode 100644 index 2ea423c..0000000 --- a/uncloud/uncloud_pay/migrations/0010_merge_20200228_1303.py +++ /dev/null @@ -1,14 +0,0 @@ -# Generated by Django 3.0.3 on 2020-02-28 13:03 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('uncloud_pay', '0002_auto_20200227_1230'), - ('uncloud_pay', '0009_auto_20200228_0825'), - ] - - operations = [ - ] diff --git a/uncloud/uncloud_pay/migrations/0011_auto_20200229_1459.py b/uncloud/uncloud_pay/migrations/0011_auto_20200229_1459.py deleted file mode 100644 index e4edbb0..0000000 --- a/uncloud/uncloud_pay/migrations/0011_auto_20200229_1459.py +++ /dev/null @@ -1,21 +0,0 @@ -# Generated by Django 3.0.3 on 2020-02-29 14:59 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('uncloud_pay', '0010_merge_20200228_1303'), - ] - - operations = [ - migrations.RemoveField( - model_name='order', - name='one_time_price', - ), - migrations.RemoveField( - model_name='order', - name='recurring_price', - ), - ] diff --git a/uncloud/uncloud_pay/migrations/0012_orderrecord.py b/uncloud/uncloud_pay/migrations/0012_orderrecord.py deleted file mode 100644 index 7c655e4..0000000 --- a/uncloud/uncloud_pay/migrations/0012_orderrecord.py +++ /dev/null @@ -1,25 +0,0 @@ -# Generated by Django 3.0.3 on 2020-03-01 16:04 - -import django.core.validators -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - dependencies = [ - ('uncloud_pay', '0011_auto_20200229_1459'), - ] - - operations = [ - migrations.CreateModel( - name='OrderRecord', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('setup_fee', models.DecimalField(decimal_places=2, default=0.0, max_digits=10, validators=[django.core.validators.MinValueValidator(0)])), - ('recurring_price', models.DecimalField(decimal_places=2, default=0.0, max_digits=10, validators=[django.core.validators.MinValueValidator(0)])), - ('description', models.TextField()), - ('order', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='uncloud_pay.Order')), - ], - ), - ] diff --git a/uncloud/uncloud_pay/migrations/0013_paymentmethod_stripe_card_id.py b/uncloud/uncloud_pay/migrations/0013_paymentmethod_stripe_card_id.py deleted file mode 100644 index df7c065..0000000 --- a/uncloud/uncloud_pay/migrations/0013_paymentmethod_stripe_card_id.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 3.0.3 on 2020-03-02 20:14 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('uncloud_pay', '0012_orderrecord'), - ] - - operations = [ - migrations.AddField( - model_name='paymentmethod', - name='stripe_card_id', - field=models.CharField(blank=True, max_length=32, null=True), - ), - ] diff --git a/uncloud/uncloud_storage/migrations/__init__.py b/uncloud/uncloud_storage/migrations/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/uncloud/uncloud_vm/migrations/0001_initial.py b/uncloud/uncloud_vm/migrations/0001_initial.py index dc4d657..6c3d54f 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-02-25 19:50 +# Generated by Django 3.0.3 on 2020-03-03 16:50 from django.conf import settings from django.db import migrations, models @@ -11,65 +11,94 @@ class Migration(migrations.Migration): initial = True dependencies = [ + ('uncloud_pay', '__first__'), migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel( - name='VMDiskProduct', + name='VMDiskImageProduct', fields=[ ('uuid', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), - ('size_in_gb', models.FloatField()), + ('name', models.CharField(max_length=256)), + ('is_os_image', models.BooleanField(default=False)), + ('is_public', models.BooleanField(default=False)), + ('size_in_gb', models.FloatField(blank=True, null=True)), + ('import_url', models.URLField(blank=True, 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)), ], ), migrations.CreateModel( name='VMHost', fields=[ ('uuid', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), - ('hostname', models.CharField(max_length=253)), - ('physical_cores', models.IntegerField()), - ('usable_cores', models.IntegerField()), - ('usable_ram_in_gb', models.FloatField()), - ('status', models.CharField(choices=[('pending', 'Pending'), ('active', 'Active'), ('unusable', 'Unusable')], default='pending', max_length=32)), + ('hostname', models.CharField(max_length=253, unique=True)), + ('physical_cores', models.IntegerField(default=0)), + ('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)), ], ), 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)), + ('name', models.CharField(max_length=32)), ('cores', models.IntegerField()), ('ram_in_gb', models.FloatField()), + ('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(editable=False, on_delete=django.db.models.deletion.CASCADE, to='uncloud_vm.VMHost')), + ('vmhost', models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, to='uncloud_vm.VMHost')), ], - ), - migrations.CreateModel( - name='OperatingSystemDisk', - fields=[ - ('vmdiskproduct_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='uncloud_vm.VMDiskProduct')), - ('os_name', models.CharField(max_length=128)), - ], - bases=('uncloud_vm.vmdiskproduct',), + options={ + 'abstract': False, + }, ), migrations.CreateModel( name='VMWithOSProduct', fields=[ ('vmproduct_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='uncloud_vm.VMProduct')), ], + options={ + 'abstract': False, + }, bases=('uncloud_vm.vmproduct',), ), + migrations.CreateModel( + 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)), + ('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')), + ('owner', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), + ('vm', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='uncloud_vm.VMProduct')), + ], + options={ + 'abstract': False, + }, + ), migrations.CreateModel( name='VMNetworkCard', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('mac_address', models.IntegerField()), + ('ip_address', models.GenericIPAddressField(blank=True, null=True)), ('vm', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='uncloud_vm.VMProduct')), ], ), - migrations.AddField( - model_name='vmdiskproduct', - name='vm', - field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='uncloud_vm.VMProduct'), + migrations.CreateModel( + name='VMDiskProduct', + fields=[ + ('uuid', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), + ('size_in_gb', models.FloatField(blank=True)), + ('image', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='uncloud_vm.VMDiskImageProduct')), + ('owner', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), + ('vm', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='uncloud_vm.VMProduct')), + ], ), ] diff --git a/uncloud/uncloud_vm/migrations/0002_auto_20200225_1952.py b/uncloud/uncloud_vm/migrations/0002_auto_20200225_1952.py deleted file mode 100644 index 46a207b..0000000 --- a/uncloud/uncloud_vm/migrations/0002_auto_20200225_1952.py +++ /dev/null @@ -1,38 +0,0 @@ -# Generated by Django 3.0.3 on 2020-02-25 19:52 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('uncloud_vm', '0001_initial'), - ] - - operations = [ - migrations.AlterField( - model_name='vmhost', - name='hostname', - field=models.CharField(max_length=253, unique=True), - ), - migrations.AlterField( - model_name='vmhost', - name='physical_cores', - field=models.IntegerField(default=0), - ), - migrations.AlterField( - model_name='vmhost', - name='status', - field=models.CharField(choices=[('pending', 'Pending'), ('active', 'Active'), ('unusable', 'Unusable'), ('deleted', 'Deleted')], default='pending', max_length=32), - ), - migrations.AlterField( - model_name='vmhost', - name='usable_cores', - field=models.IntegerField(default=0), - ), - migrations.AlterField( - model_name='vmhost', - name='usable_ram_in_gb', - field=models.FloatField(default=0), - ), - ] diff --git a/uncloud/uncloud_vm/migrations/0003_auto_20200225_2028.py b/uncloud/uncloud_vm/migrations/0003_auto_20200225_2028.py deleted file mode 100644 index a4e5976..0000000 --- a/uncloud/uncloud_vm/migrations/0003_auto_20200225_2028.py +++ /dev/null @@ -1,19 +0,0 @@ -# Generated by Django 3.0.3 on 2020-02-25 20:28 - -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - dependencies = [ - ('uncloud_vm', '0002_auto_20200225_1952'), - ] - - operations = [ - migrations.AlterField( - model_name='vmproduct', - name='vmhost', - field=models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, to='uncloud_vm.VMHost'), - ), - ] diff --git a/uncloud/uncloud_vm/migrations/0004_vmsnapshotproduct.py b/uncloud/uncloud_vm/migrations/0004_vmsnapshotproduct.py deleted file mode 100644 index 13840b5..0000000 --- a/uncloud/uncloud_vm/migrations/0004_vmsnapshotproduct.py +++ /dev/null @@ -1,33 +0,0 @@ -# Generated by Django 3.0.3 on 2020-02-27 10:50 - -from django.conf import settings -from django.db import migrations, models -import django.db.models.deletion -import uuid - - -class Migration(migrations.Migration): - - dependencies = [ - migrations.swappable_dependency(settings.AUTH_USER_MODEL), - ('uncloud_pay', '0001_initial'), - ('uncloud_vm', '0003_auto_20200225_2028'), - ] - - operations = [ - migrations.CreateModel( - 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)), - ('gb_ssd', models.FloatField(editable=False)), - ('gb_hdd', models.FloatField(editable=False)), - ('vm_uuid', models.UUIDField()), - ('order', models.ForeignKey(editable=False, 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)), - ], - options={ - 'abstract': False, - }, - ), - ] diff --git a/uncloud/uncloud_vm/migrations/0005_auto_20200227_1230.py b/uncloud/uncloud_vm/migrations/0005_auto_20200227_1230.py deleted file mode 100644 index 5535071..0000000 --- a/uncloud/uncloud_vm/migrations/0005_auto_20200227_1230.py +++ /dev/null @@ -1,25 +0,0 @@ -# Generated by Django 3.0.3 on 2020-02-27 12:30 - -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - dependencies = [ - ('uncloud_pay', '0002_auto_20200227_1230'), - ('uncloud_vm', '0004_vmsnapshotproduct'), - ] - - operations = [ - migrations.RemoveField( - model_name='vmsnapshotproduct', - name='vm_uuid', - ), - migrations.AddField( - model_name='vmsnapshotproduct', - name='vm', - field=models.ForeignKey(default=0, on_delete=django.db.models.deletion.CASCADE, to='uncloud_vm.VMProduct'), - preserve_default=False, - ), - ] diff --git a/uncloud/uncloud_vm/migrations/0005_auto_20200227_1532.py b/uncloud/uncloud_vm/migrations/0005_auto_20200227_1532.py deleted file mode 100644 index 3ebd472..0000000 --- a/uncloud/uncloud_vm/migrations/0005_auto_20200227_1532.py +++ /dev/null @@ -1,25 +0,0 @@ -# Generated by Django 3.0.3 on 2020-02-27 15:32 - -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - dependencies = [ - ('uncloud_pay', '0004_auto_20200227_1532'), - ('uncloud_vm', '0004_vmsnapshotproduct'), - ] - - operations = [ - migrations.AddField( - model_name='vmproduct', - name='order', - field=models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, to='uncloud_pay.Order'), - ), - migrations.AlterField( - model_name='vmsnapshotproduct', - name='order', - field=models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, to='uncloud_pay.Order'), - ), - ] diff --git a/uncloud/uncloud_vm/migrations/0006_auto_20200229_1545.py b/uncloud/uncloud_vm/migrations/0006_auto_20200229_1545.py deleted file mode 100644 index 208aeaa..0000000 --- a/uncloud/uncloud_vm/migrations/0006_auto_20200229_1545.py +++ /dev/null @@ -1,53 +0,0 @@ -# Generated by Django 3.0.3 on 2020-02-29 15:45 - -from django.conf import settings -from django.db import migrations, models -import django.db.models.deletion -import uuid - - -class Migration(migrations.Migration): - - dependencies = [ - migrations.swappable_dependency(settings.AUTH_USER_MODEL), - ('uncloud_vm', '0005_auto_20200227_1230'), - ] - - operations = [ - migrations.CreateModel( - name='VMDiskImageProduct', - fields=[ - ('uuid', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), - ('name', models.CharField(max_length=256)), - ('is_os_image', models.BooleanField(default=False)), - ('is_public', models.BooleanField(default=False)), - ('size_in_gb', models.FloatField()), - ('storage_class', models.CharField(choices=[('hdd', 'HDD'), ('ssd', 'SSD')], default='ssd', max_length=32)), - ('owner', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), - ], - ), - migrations.RemoveField( - model_name='vmdiskproduct', - name='storage_class', - ), - migrations.AddField( - model_name='vmdiskproduct', - name='owner', - field=models.ForeignKey(default=1, editable=False, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL), - preserve_default=False, - ), - migrations.AddField( - model_name='vmnetworkcard', - name='ip_address', - field=models.GenericIPAddressField(blank=True, null=True), - ), - migrations.DeleteModel( - name='OperatingSystemDisk', - ), - migrations.AddField( - model_name='vmdiskproduct', - name='image', - field=models.ForeignKey(default=0, on_delete=django.db.models.deletion.CASCADE, to='uncloud_vm.VMDiskImageProduct'), - preserve_default=False, - ), - ] diff --git a/uncloud/uncloud_vm/migrations/0006_merge_20200228_1303.py b/uncloud/uncloud_vm/migrations/0006_merge_20200228_1303.py deleted file mode 100644 index 29411ca..0000000 --- a/uncloud/uncloud_vm/migrations/0006_merge_20200228_1303.py +++ /dev/null @@ -1,14 +0,0 @@ -# Generated by Django 3.0.3 on 2020-02-28 13:03 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('uncloud_vm', '0005_auto_20200227_1532'), - ('uncloud_vm', '0005_auto_20200227_1230'), - ] - - operations = [ - ] diff --git a/uncloud/uncloud_vm/migrations/0007_auto_20200228_1344.py b/uncloud/uncloud_vm/migrations/0007_auto_20200228_1344.py deleted file mode 100644 index 8867f2f..0000000 --- a/uncloud/uncloud_vm/migrations/0007_auto_20200228_1344.py +++ /dev/null @@ -1,23 +0,0 @@ -# Generated by Django 3.0.3 on 2020-02-28 13:44 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('uncloud_vm', '0006_merge_20200228_1303'), - ] - - operations = [ - migrations.AddField( - model_name='vmnetworkcard', - name='ip_address', - field=models.GenericIPAddressField(blank=True, null=True), - ), - migrations.AddField( - model_name='vmproduct', - name='status', - field=models.CharField(choices=[('pending', 'Pending'), ('being_created', 'Being created'), ('active', 'Active'), ('deleted', 'Deleted')], default='pending', max_length=256), - ), - ] diff --git a/uncloud/uncloud_vm/migrations/0007_auto_20200229_1559.py b/uncloud/uncloud_vm/migrations/0007_auto_20200229_1559.py deleted file mode 100644 index 6e08c0c..0000000 --- a/uncloud/uncloud_vm/migrations/0007_auto_20200229_1559.py +++ /dev/null @@ -1,23 +0,0 @@ -# Generated by Django 3.0.3 on 2020-02-29 15:59 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('uncloud_vm', '0006_auto_20200229_1545'), - ] - - operations = [ - migrations.AddField( - model_name='vmdiskimageproduct', - name='import_url', - field=models.URLField(blank=True, null=True), - ), - migrations.AlterField( - model_name='vmdiskimageproduct', - name='size_in_gb', - field=models.FloatField(blank=True, null=True), - ), - ] diff --git a/uncloud/uncloud_vm/migrations/0008_auto_20200229_1611.py b/uncloud/uncloud_vm/migrations/0008_auto_20200229_1611.py deleted file mode 100644 index 8a9be67..0000000 --- a/uncloud/uncloud_vm/migrations/0008_auto_20200229_1611.py +++ /dev/null @@ -1,23 +0,0 @@ -# Generated by Django 3.0.3 on 2020-02-29 16:11 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('uncloud_vm', '0007_auto_20200229_1559'), - ] - - operations = [ - migrations.AddField( - model_name='vmdiskimageproduct', - name='status', - field=models.CharField(choices=[('pending', 'Pending'), ('creating', 'Creating'), ('active', 'Active'), ('disabled', 'Disabled'), ('unusable', 'Unusable'), ('deleted', 'Deleted')], default='pending', max_length=32), - ), - migrations.AlterField( - model_name='vmhost', - name='status', - field=models.CharField(choices=[('pending', 'Pending'), ('creating', 'Creating'), ('active', 'Active'), ('disabled', 'Disabled'), ('unusable', 'Unusable'), ('deleted', 'Deleted')], default='pending', max_length=32), - ), - ] diff --git a/uncloud/uncloud_vm/migrations/0008_vmproduct_name.py b/uncloud/uncloud_vm/migrations/0008_vmproduct_name.py deleted file mode 100644 index 75ff7d0..0000000 --- a/uncloud/uncloud_vm/migrations/0008_vmproduct_name.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 3.0.3 on 2020-02-28 14:05 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('uncloud_vm', '0007_auto_20200228_1344'), - ] - - operations = [ - migrations.AddField( - model_name='vmproduct', - name='name', - field=models.CharField(blank=True, max_length=32), - ), - ] diff --git a/uncloud/uncloud_vm/migrations/0009_auto_20200228_1416.py b/uncloud/uncloud_vm/migrations/0009_auto_20200228_1416.py deleted file mode 100644 index e29bfe9..0000000 --- a/uncloud/uncloud_vm/migrations/0009_auto_20200228_1416.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 3.0.3 on 2020-02-28 14:16 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('uncloud_vm', '0008_vmproduct_name'), - ] - - operations = [ - migrations.AlterField( - model_name='vmproduct', - name='name', - field=models.CharField(max_length=32), - ), - ] diff --git a/uncloud/ungleich_service/migrations/0001_initial.py b/uncloud/ungleich_service/migrations/0001_initial.py deleted file mode 100644 index 2e19344..0000000 --- a/uncloud/ungleich_service/migrations/0001_initial.py +++ /dev/null @@ -1,33 +0,0 @@ -# Generated by Django 3.0.3 on 2020-02-28 13:44 - -from django.conf import settings -from django.db import migrations, models -import django.db.models.deletion -import uuid - - -class Migration(migrations.Migration): - - initial = True - - dependencies = [ - ('uncloud_pay', '0010_merge_20200228_1303'), - migrations.swappable_dependency(settings.AUTH_USER_MODEL), - ('uncloud_vm', '0007_auto_20200228_1344'), - ] - - operations = [ - migrations.CreateModel( - name='MatrixServiceProduct', - 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)), - ('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)), - ('vm', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='uncloud_vm.VMProduct')), - ], - options={ - 'abstract': False, - }, - ), - ] diff --git a/uncloud/ungleich_service/migrations/0002_matrixserviceproduct_domain.py b/uncloud/ungleich_service/migrations/0002_matrixserviceproduct_domain.py deleted file mode 100644 index fda0075..0000000 --- a/uncloud/ungleich_service/migrations/0002_matrixserviceproduct_domain.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 3.0.3 on 2020-02-28 14:16 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('ungleich_service', '0001_initial'), - ] - - operations = [ - migrations.AddField( - model_name='matrixserviceproduct', - name='domain', - field=models.CharField(default='domain.tld', max_length=255), - ), - ] diff --git a/uncloud/ungleich_service/migrations/__init__.py b/uncloud/ungleich_service/migrations/__init__.py deleted file mode 100644 index e69de29..0000000