# Generated by Django 2.1.1 on 2019-01-29 12:44

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Farmer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(default='', max_length=100)),
                ('lastname', models.CharField(default='', max_length=100)),
                ('age', models.IntegerField(default='')),
                ('address', models.TextField(default='', max_length=500)),
                ('tel', models.TextField(default='', max_length=100)),
                ('User_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Harvest',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('product', models.IntegerField(default='')),
            ],
        ),
        migrations.CreateModel(
            name='Plant',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('fruit_name', models.CharField(default='', max_length=100)),
                ('fruit_breed', models.CharField(default='', max_length=100)),
                ('scale', models.CharField(default='', max_length=100)),
                ('Farmer_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Farmer.Farmer')),
            ],
        ),
        migrations.CreateModel(
            name='YearSet',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('year', models.CharField(default='', max_length=4)),
            ],
            options={
                'ordering': ['-year'],
            },
        ),
        migrations.AddField(
            model_name='harvest',
            name='Plant_id',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='Farmer.Plant'),
        ),
        migrations.AddField(
            model_name='harvest',
            name='years',
            field=models.ForeignKey(default='2017', on_delete=django.db.models.deletion.CASCADE, to='Farmer.YearSet'),
        ),
    ]
