# Generated by Django 3.1.5 on 2021-01-05 10:46

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('flavours', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Stock',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('size', models.CharField(choices=[('L', 'Large'), ('M', 'Medium'), ('S', 'Small')], default='L', max_length=1)),
                ('flavour', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='stock_for_sizes', to='flavours.flavour')),
            ],
            options={
                'verbose_name': 'Stock',
                'verbose_name_plural': 'Stocks',
            },
        ),
        migrations.AddConstraint(
            model_name='stock',
            constraint=models.UniqueConstraint(fields=('flavour', 'size'), name='unique_flavour_size'),
        ),
    ]
