Mess with migrations

This commit is contained in:
Nico Schottelius 2020-02-23 11:41:51 +01:00
parent 7f821b4d5a
commit 581865460b
5 changed files with 17 additions and 77 deletions

View file

@ -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 from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration): class Migration(migrations.Migration):
@ -8,16 +11,16 @@ class Migration(migrations.Migration):
initial = True initial = True
dependencies = [ dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
] ]
operations = [ operations = [
migrations.CreateModel( migrations.CreateModel(
name='VM', name='VM',
fields=[ fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('vmid', models.IntegerField(primary_key=True, serialize=False)),
('vmid', models.IntegerField()), ('data', django.contrib.postgres.fields.jsonb.JSONField()),
('owner', models.CharField(max_length=128)), ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
('data', models.CharField(max_length=65536)),
], ],
), ),
] ]

View file

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

View file

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

View file

@ -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.conf import settings
from django.db import migrations, models from django.db import migrations, models
@ -16,35 +16,16 @@ class Migration(migrations.Migration):
operations = [ operations = [
migrations.CreateModel( migrations.CreateModel(
name='OrderReference', name='VMSnapshotProduct',
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',
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)),
('gb_ssd', 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)),
('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,
},
), ),
] ]

View file

@ -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.models
import django.contrib.auth.validators import django.contrib.auth.validators