# Generated by Django 2.2.4 on 2019-09-02 18:51

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Food',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(db_index=True, max_length=255)),
                ('unit_price', models.DecimalField(decimal_places=2, max_digits=8)),
                ('created_ts', models.DateTimeField(auto_now_add=True, db_index=True)),
                ('updated_ts', models.DateTimeField(auto_now=True, db_index=True)),
            ],
            options={
                'verbose_name_plural': 'food',
                'db_table': 'food',
            },
        ),
        migrations.CreateModel(
            name='Ingredient',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('quantity', models.DecimalField(decimal_places=2, max_digits=8)),
                ('unit_type', models.CharField(max_length=255)),
                ('created_ts', models.DateTimeField(auto_now_add=True, db_index=True)),
                ('updated_ts', models.DateTimeField(auto_now=True, db_index=True)),
                ('food', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='api.Food')),
            ],
            options={
                'db_table': 'ingredients',
            },
        ),
        migrations.CreateModel(
            name='RestrictionTag',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(db_index=True, max_length=255)),
                ('created_ts', models.DateTimeField(auto_now_add=True, db_index=True)),
                ('updated_ts', models.DateTimeField(auto_now=True, db_index=True)),
            ],
            options={
                'db_table': 'restriction_tags',
            },
        ),
        migrations.CreateModel(
            name='Recipe',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(db_index=True, max_length=255)),
                ('created_ts', models.DateTimeField(auto_now_add=True, db_index=True)),
                ('updated_ts', models.DateTimeField(auto_now=True, db_index=True)),
                ('ingredients', models.ManyToManyField(to='api.Ingredient')),
                ('restrictions', models.ManyToManyField(to='api.RestrictionTag')),
            ],
            options={
                'db_table': 'recipes',
            },
        ),
    ]
