# -*- coding: utf-8 -*-
# Generated by Django 1.11.2 on 2018-10-24 16:07
from __future__ import unicode_literals

import django.contrib.postgres.fields.jsonb
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    dependencies = [
        ('batch', '0007_auto_20180516_1915'),
        ('recipe', '0029_auto_20181016_1431'),
    ]

    operations = [
        migrations.CreateModel(
            name='RecipeCondition',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('data', django.contrib.postgres.fields.jsonb.JSONField(blank=True, null=True)),
                ('is_processed', models.BooleanField(default=False)),
                ('is_accepted', models.BooleanField(default=False)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('processed', models.DateTimeField(blank=True, null=True)),
                ('last_modified', models.DateTimeField(auto_now=True)),
                ('batch', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='conditions_for_batch', to='batch.Batch')),
                ('recipe', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='conditions_for_recipe', to='recipe.Recipe')),
                ('root_recipe', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='conditions_for_root_recipe', to='recipe.Recipe')),
            ],
            options={
                'db_table': 'recipe_condition',
            },
        ),
        migrations.AddField(
            model_name='recipenode',
            name='condition',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='recipe.RecipeCondition'),
        ),
    ]
