diff --git a/nicohack202002/uncloud/opennebula/migrations/0001_initial.py b/nicohack202002/uncloud/opennebula/migrations/0001_initial.py index e2c6a1f..f1d3d6b 100644 --- a/nicohack202002/uncloud/opennebula/migrations/0001_initial.py +++ b/nicohack202002/uncloud/opennebula/migrations/0001_initial.py @@ -1,6 +1,9 @@ -# Generated by Django 3.0.3 on 2020-02-21 10:22 +# Generated by Django 3.0.3 on 2020-02-23 10:02 +from django.conf import settings +import django.contrib.postgres.fields.jsonb from django.db import migrations, models +import django.db.models.deletion class Migration(migrations.Migration): @@ -8,16 +11,16 @@ class Migration(migrations.Migration): initial = True dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel( name='VM', fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('vmid', models.IntegerField()), - ('owner', models.CharField(max_length=128)), - ('data', models.CharField(max_length=65536)), + ('vmid', models.IntegerField(primary_key=True, serialize=False)), + ('data', django.contrib.postgres.fields.jsonb.JSONField()), + ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), ], ), ] diff --git a/nicohack202002/uncloud/opennebula/migrations/0002_auto_20200221_1024.py b/nicohack202002/uncloud/opennebula/migrations/0002_auto_20200221_1024.py deleted file mode 100644 index 43b7442..0000000 --- a/nicohack202002/uncloud/opennebula/migrations/0002_auto_20200221_1024.py +++ /dev/null @@ -1,23 +0,0 @@ -# Generated by Django 3.0.3 on 2020-02-21 10:24 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('opennebula', '0001_initial'), - ] - - operations = [ - migrations.AlterField( - model_name='vm', - name='data', - field=models.CharField(max_length=65536, null=True), - ), - migrations.AlterField( - model_name='vm', - name='owner', - field=models.CharField(max_length=128, null=True), - ), - ] diff --git a/nicohack202002/uncloud/opennebula/migrations/0003_auto_20200221_1113.py b/nicohack202002/uncloud/opennebula/migrations/0003_auto_20200221_1113.py deleted file mode 100644 index 9ccc22e..0000000 --- a/nicohack202002/uncloud/opennebula/migrations/0003_auto_20200221_1113.py +++ /dev/null @@ -1,21 +0,0 @@ -# Generated by Django 3.0.3 on 2020-02-21 11:13 - -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), - ('opennebula', '0002_auto_20200221_1024'), - ] - - operations = [ - migrations.AlterField( - model_name='vm', - name='owner', - field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL), - ), - ] diff --git a/nicohack202002/uncloud/uncloud_api/migrations/0001_initial.py b/nicohack202002/uncloud/uncloud_api/migrations/0001_initial.py index 33be28d..d8d9630 100644 --- a/nicohack202002/uncloud/uncloud_api/migrations/0001_initial.py +++ b/nicohack202002/uncloud/uncloud_api/migrations/0001_initial.py @@ -1,4 +1,4 @@ -# Generated by Django 3.0.3 on 2020-02-21 10:42 +# Generated by Django 3.0.3 on 2020-02-23 10:16 from django.conf import settings from django.db import migrations, models @@ -16,35 +16,16 @@ class Migration(migrations.Migration): operations = [ migrations.CreateModel( - name='OrderReference', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ], - ), - migrations.CreateModel( - name='Product', - fields=[ - ('uuid', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), - ('name', models.CharField(max_length=256)), - ('recurring_period', models.CharField(choices=[('per_year', 'Per Year'), ('per_month', 'Per Month'), ('per_week', 'Per Week'), ('per_day', 'Per Day'), ('per_hour', 'Per Hour'), ('not_recurring', 'Not recurring')], default='not_recurring', max_length=256)), - ], - ), - migrations.CreateModel( - name='Order', + 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'), ('created_active', 'Created'), ('deleted', 'Deleted')], default='pending', max_length=256)), + ('gb_ssd', models.FloatField()), + ('gb_hdd', models.FloatField()), ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), - ('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='uncloud_api.Product')), - ], - ), - migrations.CreateModel( - name='Feature', - fields=[ - ('uuid', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), - ('name', models.CharField(max_length=256)), - ('recurring_price', models.FloatField(default=0)), - ('one_time_price', models.FloatField()), - ('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='uncloud_api.Product')), ], + options={ + 'abstract': False, + }, ), ] diff --git a/nicohack202002/uncloud/uncloud_auth/migrations/0001_initial.py b/nicohack202002/uncloud/uncloud_auth/migrations/0001_initial.py index 267adf2..a3ade55 100644 --- a/nicohack202002/uncloud/uncloud_auth/migrations/0001_initial.py +++ b/nicohack202002/uncloud/uncloud_auth/migrations/0001_initial.py @@ -1,4 +1,4 @@ -# Generated by Django 3.0.3 on 2020-02-21 10:41 +# Generated by Django 3.0.3 on 2020-02-23 10:02 import django.contrib.auth.models import django.contrib.auth.validators