# Generated by Django 2.2 on 2019-04-07 09:26

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('total_price', models.DecimalField(decimal_places=2, default=0.0, max_digits=15)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
            ],
            options={
                'ordering': ['-created_at'],
            },
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=120)),
                ('process', models.CharField(max_length=120)),
                ('flavor', models.CharField(max_length=120)),
                ('origin', models.CharField(max_length=120)),
                ('description', models.TextField()),
                ('price', models.DecimalField(decimal_places=2, max_digits=5)),
                ('image', models.ImageField(blank=True, null=True, upload_to='')),
                ('is_avaliable', models.BooleanField(default=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
            ],
            options={
                'ordering': ['-created_at'],
            },
        ),
        migrations.CreateModel(
            name='Status',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=120)),
                ('is_active', models.BooleanField(default=True)),
            ],
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('image', models.ImageField(blank=True, null=True, upload_to='')),
                ('customer', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='OrderProduct',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('quantity', models.PositiveIntegerField(default=1)),
                ('total_price', models.DecimalField(decimal_places=2, default=0.0, max_digits=15)),
                ('order', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, related_name='order_products', to='api.Order')),
                ('product', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='api.Product')),
            ],
        ),
        migrations.AddField(
            model_name='order',
            name='ordered_by',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='customer_orders', to='api.Profile'),
        ),
        migrations.AddField(
            model_name='order',
            name='status',
            field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, related_name='orders_status', to='api.Status'),
        ),
    ]

a7c2296c7534dbb1d03d6d81ec32bf97a797e0b3
<mask token>

<mask token>


class Migration(migrations.Migration):
    <mask token>
    <mask token>
    <mask token>

<mask token>


class Migration(migrations.Migration):
    initial = True
    dependencies = [migrations.swappable_dependency(settings.AUTH_USER_MODEL)]
    operations = [migrations.CreateModel(name='Order', fields=[('id',
        models.AutoField(auto_created=True, primary_key=True, serialize=
        False, verbose_name='ID')), ('total_price', models.DecimalField(
        decimal_places=2, default=0.0, max_digits=15)), ('created_at',
        models.DateTimeField(auto_now_add=True))], options={'ordering': [
        '-created_at']}), migrations.CreateModel(name='Product', fields=[(
        'id', models.AutoField(auto_created=True, primary_key=True,
        serialize=False, verbose_name='ID')), ('name', models.CharField(
        max_length=120)), ('process', models.CharField(max_length=120)), (
        'flavor', models.CharField(max_length=120)), ('origin', models.
        CharField(max_length=120)), ('description', models.TextField()), (
        'price', models.DecimalField(decimal_places=2, max_digits=5)), (
        'image', models.ImageField(blank=True, null=True, upload_to='')), (
        'is_avaliable', models.BooleanField(default=True)), ('created_at',
        models.DateTimeField(auto_now_add=True))], options={'ordering': [
        '-created_at']}), migrations.CreateModel(name='Status', fields=[(
        'id', models.AutoField(auto_created=True, primary_key=True,
        serialize=False, verbose_name='ID')), ('title', models.CharField(
        max_length=120)), ('is_active', models.BooleanField(default=True))]
        ), migrations.CreateModel(name='Profile', fields=[('id', models.
        AutoField(auto_created=True, primary_key=True, serialize=False,
        verbose_name='ID')), ('image', models.ImageField(blank=True, null=
        True, upload_to='')), ('customer', models.OneToOneField(on_delete=
        django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL))]),
        migrations.CreateModel(name='OrderProduct', fields=[('id', models.
        AutoField(auto_created=True, primary_key=True, serialize=False,
        verbose_name='ID')), ('quantity', models.PositiveIntegerField(
        default=1)), ('total_price', models.DecimalField(decimal_places=2,
        default=0.0, max_digits=15)), ('order', models.ForeignKey(default=1,
        on_delete=django.db.models.deletion.CASCADE, related_name=
        'order_products', to='api.Order')), ('product', models.ForeignKey(
        default=1, on_delete=django.db.models.deletion.CASCADE, to=
        'api.Product'))]), migrations.AddField(model_name='order', name=
        'ordered_by', field=models.ForeignKey(on_delete=django.db.models.
        deletion.CASCADE, related_name='customer_orders', to='api.Profile')
        ), migrations.AddField(model_name='order', name='status', field=
        models.ForeignKey(default=1, on_delete=django.db.models.deletion.
        CASCADE, related_name='orders_status', to='api.Status'))]

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):
    initial = True
    dependencies = [migrations.swappable_dependency(settings.AUTH_USER_MODEL)]
    operations = [migrations.CreateModel(name='Order', fields=[('id',
        models.AutoField(auto_created=True, primary_key=True, serialize=
        False, verbose_name='ID')), ('total_price', models.DecimalField(
        decimal_places=2, default=0.0, max_digits=15)), ('created_at',
        models.DateTimeField(auto_now_add=True))], options={'ordering': [
        '-created_at']}), migrations.CreateModel(name='Product', fields=[(
        'id', models.AutoField(auto_created=True, primary_key=True,
        serialize=False, verbose_name='ID')), ('name', models.CharField(
        max_length=120)), ('process', models.CharField(max_length=120)), (
        'flavor', models.CharField(max_length=120)), ('origin', models.
        CharField(max_length=120)), ('description', models.TextField()), (
        'price', models.DecimalField(decimal_places=2, max_digits=5)), (
        'image', models.ImageField(blank=True, null=True, upload_to='')), (
        'is_avaliable', models.BooleanField(default=True)), ('created_at',
        models.DateTimeField(auto_now_add=True))], options={'ordering': [
        '-created_at']}), migrations.CreateModel(name='Status', fields=[(
        'id', models.AutoField(auto_created=True, primary_key=True,
        serialize=False, verbose_name='ID')), ('title', models.CharField(
        max_length=120)), ('is_active', models.BooleanField(default=True))]
        ), migrations.CreateModel(name='Profile', fields=[('id', models.
        AutoField(auto_created=True, primary_key=True, serialize=False,
        verbose_name='ID')), ('image', models.ImageField(blank=True, null=
        True, upload_to='')), ('customer', models.OneToOneField(on_delete=
        django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL))]),
        migrations.CreateModel(name='OrderProduct', fields=[('id', models.
        AutoField(auto_created=True, primary_key=True, serialize=False,
        verbose_name='ID')), ('quantity', models.PositiveIntegerField(
        default=1)), ('total_price', models.DecimalField(decimal_places=2,
        default=0.0, max_digits=15)), ('order', models.ForeignKey(default=1,
        on_delete=django.db.models.deletion.CASCADE, related_name=
        'order_products', to='api.Order')), ('product', models.ForeignKey(
        default=1, on_delete=django.db.models.deletion.CASCADE, to=
        'api.Product'))]), migrations.AddField(model_name='order', name=
        'ordered_by', field=models.ForeignKey(on_delete=django.db.models.
        deletion.CASCADE, related_name='customer_orders', to='api.Profile')
        ), migrations.AddField(model_name='order', name='status', field=
        models.ForeignKey(default=1, on_delete=django.db.models.deletion.
        CASCADE, related_name='orders_status', to='api.Status'))]

# Generated by Django 2.2 on 2019-04-07 09:26

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('total_price', models.DecimalField(decimal_places=2, default=0.0, max_digits=15)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
            ],
            options={
                'ordering': ['-created_at'],
            },
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=120)),
                ('process', models.CharField(max_length=120)),
                ('flavor', models.CharField(max_length=120)),
                ('origin', models.CharField(max_length=120)),
                ('description', models.TextField()),
                ('price', models.DecimalField(decimal_places=2, max_digits=5)),
                ('image', models.ImageField(blank=True, null=True, upload_to='')),
                ('is_avaliable', models.BooleanField(default=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
            ],
            options={
                'ordering': ['-created_at'],
            },
        ),
        migrations.CreateModel(
            name='Status',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=120)),
                ('is_active', models.BooleanField(default=True)),
            ],
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('image', models.ImageField(blank=True, null=True, upload_to='')),
                ('customer', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='OrderProduct',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('quantity', models.PositiveIntegerField(default=1)),
                ('total_price', models.DecimalField(decimal_places=2, default=0.0, max_digits=15)),
                ('order', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, related_name='order_products', to='api.Order')),
                ('product', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, to='api.Product')),
            ],
        ),
        migrations.AddField(
            model_name='order',
            name='ordered_by',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='customer_orders', to='api.Profile'),
        ),
        migrations.AddField(
            model_name='order',
            name='status',
            field=models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, related_name='orders_status', to='api.Status'),
        ),
    ]
