uncloud-mravi/uncloud/uncloud_vm/migrations/0006_auto_20200229_1545.py
Ahmed Bilal 028fd6789f ++cleanup
Signed-off-by: Nico Schottelius <nico@nico-notebook.schottelius.org>
2020-03-02 07:17:04 +01:00

53 lines
2 KiB
Python

# 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,
),
]