# Generated by Django 2.1 on 2018-08-05 19:41

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Ingredient',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=100)),
            ],
            options={
                'verbose_name': 'Ingredient',
                'verbose_name_plural': 'Ingredients',
            },
        ),
        migrations.CreateModel(
            name='IngredientQuantity',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('quantity', models.DecimalField(decimal_places=1, max_digits=5)),
                ('ingredient', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='recipebook.Ingredient')),
            ],
            options={
                'verbose_name': 'Ingredient Quantity',
                'verbose_name_plural': 'Ingredient Quantities',
            },
        ),
        migrations.CreateModel(
            name='IngredientSection',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('section_name', models.CharField(max_length=100)),
            ],
            options={
                'verbose_name': 'Ingredient Section',
                'verbose_name_plural': 'Ingredient Sections',
            },
        ),
        migrations.CreateModel(
            name='Recipe',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('title', models.CharField(max_length=150)),
                ('instructions', models.TextField(blank=True)),
            ],
            options={
                'verbose_name': 'Recipe',
                'verbose_name_plural': 'Recipes',
            },
        ),
        migrations.CreateModel(
            name='Unit',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=50)),
                ('short_name', models.CharField(blank=True, max_length=25)),
            ],
            options={
                'verbose_name': 'Unit',
                'verbose_name_plural': 'Units',
            },
        ),
        migrations.AddField(
            model_name='ingredientsection',
            name='recipe',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='ingredient_sections', to='recipebook.Recipe'),
        ),
        migrations.AddField(
            model_name='ingredientquantity',
            name='ingredient_section',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='ingredient_quantities', to='recipebook.IngredientSection'),
        ),
        migrations.AddField(
            model_name='ingredient',
            name='unit',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='recipebook.Unit'),
        ),
    ]
