uncloud/uncloud_pay/migrations/0016_auto_20200928_1858.py
Nico Schottelius c6bacab35a Phasing out Product model
Signed-off-by: Nico Schottelius <nico@nico-notebook.schottelius.org>
2020-09-28 20:59:08 +02:00

65 lines
2.3 KiB
Python

# Generated by Django 3.1 on 2020-09-28 18:58
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', '0015_auto_20200928_1844'),
]
operations = [
migrations.RemoveField(
model_name='sampleonetimeproduct',
name='extra_data',
),
migrations.RemoveField(
model_name='sampleonetimeproduct',
name='owner',
),
migrations.RemoveField(
model_name='sampleonetimeproduct',
name='status',
),
migrations.RemoveField(
model_name='samplerecurringproduct',
name='extra_data',
),
migrations.RemoveField(
model_name='samplerecurringproduct',
name='owner',
),
migrations.RemoveField(
model_name='samplerecurringproduct',
name='status',
),
migrations.RemoveField(
model_name='samplerecurringproductonetimefee',
name='extra_data',
),
migrations.RemoveField(
model_name='samplerecurringproductonetimefee',
name='owner',
),
migrations.RemoveField(
model_name='samplerecurringproductonetimefee',
name='status',
),
migrations.CreateModel(
name='Product',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('extra_data', models.JSONField(blank=True, editable=False, null=True)),
('status', models.CharField(choices=[('PENDING', 'Pending'), ('AWAITING_PAYMENT', 'Awaiting payment'), ('BEING_CREATED', 'Being created'), ('SCHEDULED', 'Scheduled'), ('ACTIVE', 'Active'), ('MODIFYING', 'Modifying'), ('DELETED', 'Deleted'), ('DISABLED', 'Disabled'), ('UNUSABLE', 'Unusable')], default='AWAITING_PAYMENT', max_length=32)),
('config', models.JSONField()),
('owner', models.ForeignKey(editable=False, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
],
options={
'abstract': False,
},
),
]