# Generated by Django 3.0.7 on 2020-11-29 16:47

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


class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name="Recipe",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "name",
                    models.CharField(
                        help_text="The name of this recipe", max_length=100
                    ),
                ),
                ("slug", models.SlugField()),
                ("instruction_text", markdownx.models.MarkdownxField()),
            ],
        ),
        migrations.CreateModel(
            name="Unit",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "name",
                    models.CharField(
                        help_text="The name of the unit of measurement",
                        max_length=100,
                        unique=True,
                    ),
                ),
            ],
        ),
        migrations.CreateModel(
            name="RecipeIngredient",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "name",
                    models.CharField(
                        help_text="The name of this ingredient", max_length=100
                    ),
                ),
                ("amount", models.PositiveIntegerField()),
                (
                    "recipe",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE, to="recipes.Recipe"
                    ),
                ),
                (
                    "unit",
                    models.ForeignKey(
                        default="stk",
                        on_delete=django.db.models.deletion.CASCADE,
                        to="recipes.Unit",
                        to_field="name",
                    ),
                ),
            ],
        ),
    ]
