# -*- coding: utf-8 -*-
# Generated by Django 1.11.2 on 2017-08-31 19:38
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    dependencies = [
        ('simulation', '0014_feed_avaliable'),
        ('CropPcse', '0002_auto_20170831_1719'),
    ]

    operations = [
        migrations.CreateModel(
            name='Agromanagement',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=20)),
                ('scenario', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='simulation.Scenario')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Campaign',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateField()),
                ('agromanagement', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='CropPcse.Agromanagement')),
            ],
        ),
        migrations.CreateModel(
            name='CropCalender',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('crop_name', models.CharField(max_length=20)),
                ('variety_name', models.CharField(max_length=20)),
                ('crop_start_date', models.DateField()),
                ('crop_start_type', models.CharField(max_length=20)),
                ('crop_end_date', models.DateField(null=True)),
                ('crop_end_type', models.CharField(max_length=20)),
                ('max_duration', models.IntegerField(null=True)),
                ('campaign', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='CropPcse.Campaign')),
            ],
        ),
        migrations.CreateModel(
            name='Fertilization',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateField()),
                ('N_amount', models.FloatField()),
                ('N_recovery', models.FloatField()),
                ('P_amount', models.FloatField()),
                ('P_recovery', models.FloatField()),
                ('K_amount', models.FloatField()),
                ('K_recovery', models.FloatField()),
                ('campaign', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='CropPcse.Campaign')),
            ],
        ),
        migrations.CreateModel(
            name='Irrigation',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateField()),
                ('ammount', models.FloatField()),
                ('efficiency', models.FloatField()),
                ('campaign', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='CropPcse.Campaign')),
            ],
        ),
        migrations.AlterUniqueTogether(
            name='agromanagement',
            unique_together=set([('scenario', 'name')]),
        ),
    ]
