fix migrations the ugly way
Signed-off-by: Nico Schottelius <nico@nico-notebook.schottelius.org>
This commit is contained in:
parent
50df7050d6
commit
15b0fe3dc9
9 changed files with 12 additions and 112 deletions
|
@ -1,9 +1,10 @@
|
||||||
# Generated by Django 3.0.3 on 2020-02-23 10:02
|
# Generated by Django 3.0.3 on 2020-02-23 17:08
|
||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
import django.contrib.postgres.fields.jsonb
|
import django.contrib.postgres.fields.jsonb
|
||||||
from django.db import migrations, models
|
from django.db import migrations, models
|
||||||
import django.db.models.deletion
|
import django.db.models.deletion
|
||||||
|
import uuid
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
class Migration(migrations.Migration):
|
||||||
|
@ -19,6 +20,7 @@ class Migration(migrations.Migration):
|
||||||
name='VM',
|
name='VM',
|
||||||
fields=[
|
fields=[
|
||||||
('vmid', models.IntegerField(primary_key=True, serialize=False)),
|
('vmid', models.IntegerField(primary_key=True, serialize=False)),
|
||||||
|
('uuid', models.UUIDField(default=uuid.uuid4, editable=False, unique=True)),
|
||||||
('data', django.contrib.postgres.fields.jsonb.JSONField()),
|
('data', django.contrib.postgres.fields.jsonb.JSONField()),
|
||||||
('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
|
('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
|
||||||
],
|
],
|
||||||
|
|
|
@ -1,19 +0,0 @@
|
||||||
# Generated by Django 3.0.3 on 2020-02-23 10:55
|
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
import uuid
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('opennebula', '0001_initial'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AddField(
|
|
||||||
model_name='vm',
|
|
||||||
name='uuid',
|
|
||||||
field=models.UUIDField(default=uuid.uuid4, editable=False),
|
|
||||||
),
|
|
||||||
]
|
|
|
@ -1,19 +0,0 @@
|
||||||
# Generated by Django 3.0.3 on 2020-02-23 10:58
|
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
import uuid
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('opennebula', '0002_vm_uuid'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.AlterField(
|
|
||||||
model_name='vm',
|
|
||||||
name='uuid',
|
|
||||||
field=models.UUIDField(default=uuid.uuid4, editable=False, unique=True),
|
|
||||||
),
|
|
||||||
]
|
|
|
@ -1,23 +0,0 @@
|
||||||
# Generated by Django 3.0.3 on 2020-02-22 07:13
|
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
import uuid
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('opennebula', '0003_auto_20200221_1113'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.RemoveField(
|
|
||||||
model_name='vm',
|
|
||||||
name='id',
|
|
||||||
),
|
|
||||||
migrations.AddField(
|
|
||||||
model_name='vm',
|
|
||||||
name='uuid',
|
|
||||||
field=models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False),
|
|
||||||
),
|
|
||||||
]
|
|
|
@ -1,4 +1,4 @@
|
||||||
# Generated by Django 3.0.3 on 2020-02-23 10:16
|
# Generated by Django 3.0.3 on 2020-02-23 17:09
|
||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.db import migrations, models
|
from django.db import migrations, models
|
||||||
|
@ -19,7 +19,7 @@ class Migration(migrations.Migration):
|
||||||
name='VMSnapshotProduct',
|
name='VMSnapshotProduct',
|
||||||
fields=[
|
fields=[
|
||||||
('uuid', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
|
('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)),
|
('status', models.CharField(choices=[('pending', 'Pending'), ('being_created', 'Being created'), ('active', 'Active'), ('deleted', 'Deleted')], default='pending', max_length=256)),
|
||||||
('gb_ssd', models.FloatField()),
|
('gb_ssd', models.FloatField()),
|
||||||
('gb_hdd', models.FloatField()),
|
('gb_hdd', models.FloatField()),
|
||||||
('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
|
('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
|
||||||
|
|
|
@ -1,46 +0,0 @@
|
||||||
# Generated by Django 3.0.3 on 2020-02-22 07:19
|
|
||||||
|
|
||||||
from django.db import migrations, models
|
|
||||||
import django.db.models.deletion
|
|
||||||
|
|
||||||
|
|
||||||
class Migration(migrations.Migration):
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
('uncloud_api', '0001_initial'),
|
|
||||||
]
|
|
||||||
|
|
||||||
operations = [
|
|
||||||
migrations.CreateModel(
|
|
||||||
name='VMSnapshotOrder',
|
|
||||||
fields=[
|
|
||||||
('order_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='uncloud_api.Order')),
|
|
||||||
],
|
|
||||||
bases=('uncloud_api.order',),
|
|
||||||
),
|
|
||||||
migrations.CreateModel(
|
|
||||||
name='VMSnapshotProduct',
|
|
||||||
fields=[
|
|
||||||
('product_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='uncloud_api.Product')),
|
|
||||||
('gb_ssd', models.FloatField()),
|
|
||||||
('gb_hdd', models.FloatField()),
|
|
||||||
],
|
|
||||||
bases=('uncloud_api.product',),
|
|
||||||
),
|
|
||||||
migrations.DeleteModel(
|
|
||||||
name='OrderReference',
|
|
||||||
),
|
|
||||||
migrations.RemoveField(
|
|
||||||
model_name='product',
|
|
||||||
name='name',
|
|
||||||
),
|
|
||||||
migrations.RemoveField(
|
|
||||||
model_name='product',
|
|
||||||
name='recurring_period',
|
|
||||||
),
|
|
||||||
migrations.AddField(
|
|
||||||
model_name='product',
|
|
||||||
name='status',
|
|
||||||
field=models.CharField(choices=[('pending', 'Pending'), ('being_created', 'Being created'), ('created_active', 'Created'), ('deleted', 'Deleted')], default='pending', max_length=256),
|
|
||||||
),
|
|
||||||
]
|
|
|
@ -45,12 +45,17 @@ class Product(models.Model):
|
||||||
choices = (
|
choices = (
|
||||||
('pending', 'Pending'),
|
('pending', 'Pending'),
|
||||||
('being_created', 'Being created'),
|
('being_created', 'Being created'),
|
||||||
('created_active', 'Created'),
|
('active', 'Active'),
|
||||||
('deleted', 'Deleted')
|
('deleted', 'Deleted')
|
||||||
),
|
),
|
||||||
default='pending'
|
default='pending'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
recurring_price = models.FloatField()
|
||||||
|
one_time_price = models.FloatField()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
abstract = True
|
abstract = True
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# Generated by Django 3.0.3 on 2020-02-23 10:02
|
# Generated by Django 3.0.3 on 2020-02-23 17:08
|
||||||
|
|
||||||
import django.contrib.auth.models
|
import django.contrib.auth.models
|
||||||
import django.contrib.auth.validators
|
import django.contrib.auth.validators
|
||||||
|
|
Loading…
Reference in a new issue