# Generated by Django 3.2.6 on 2021-08-21 21:43

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='FertilizerComponents',
            fields=[
                ('component', models.CharField(max_length=255, primary_key=True, serialize=False)),
                ('component_percentage', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='PlantTermDetails',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('plant_name', models.CharField(max_length=255)),
                ('plant_type', models.CharField(choices=[('Long', 'Long Term Cover Crops'), ('Short', 'Short Term Cover Crops')], default='Long', max_length=255)),
                ('plant_picture', models.ImageField(blank=True, null=True, upload_to='')),
                ('planting_application', models.CharField(choices=[('1st', 'Application 1'), ('2nd', 'Application 2'), ('3rd', 'Application 3')], default='1st', max_length=255)),
                ('organic', models.DecimalField(blank=True, decimal_places=2, max_digits=4, null=True)),
                ('urea', models.DecimalField(blank=True, decimal_places=2, max_digits=4, null=True)),
                ('tsp', models.DecimalField(blank=True, decimal_places=2, max_digits=4, null=True)),
                ('mop', models.DecimalField(blank=True, decimal_places=2, max_digits=4, null=True)),
                ('yala_mixture', models.DecimalField(blank=True, decimal_places=2, max_digits=5, null=True)),
                ('maha_mixture', models.DecimalField(blank=True, decimal_places=2, max_digits=5, null=True)),
            ],
            options={
                'unique_together': {('plant_name', 'planting_application')},
            },
        ),
        migrations.CreateModel(
            name='FertilizerTest',
            fields=[
                ('test_id', models.CharField(max_length=255, primary_key=True, serialize=False)),
                ('test_date', models.DateTimeField(null=True)),
                ('test_organic', models.DecimalField(decimal_places=2, max_digits=4, null=True)),
                ('test_urea', models.DecimalField(decimal_places=2, max_digits=4, null=True)),
                ('test_tsp', models.DecimalField(decimal_places=2, max_digits=4, null=True)),
                ('test_mop', models.DecimalField(decimal_places=2, max_digits=4, null=True)),
                ('test_plant', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='SoilManagement.planttermdetails')),
            ],
        ),
        migrations.CreateModel(
            name='LongTermCropDetails',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('parts_by_weight', models.IntegerField()),
                ('nutrient_percentage', models.DecimalField(decimal_places=2, max_digits=5)),
                ('component_type', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='SoilManagement.fertilizercomponents')),
                ('plant', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='SoilManagement.planttermdetails')),
            ],
            options={
                'unique_together': {('plant', 'component_type')},
            },
        ),
    ]
