# Generated by Django 2.2.17 on 2020-11-29 21:12

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import dynamic_filenames
import model_utils.fields
import stdimage.models


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Service',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False, verbose_name='created')),
                ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, editable=False, verbose_name='modified')),
                ('name', models.CharField(max_length=200)),
                ('internal_id', models.IntegerField()),
                ('external_id', models.IntegerField()),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Plant',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False, verbose_name='created')),
                ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, editable=False, verbose_name='modified')),
                ('name', models.CharField(max_length=200)),
                ('plant', models.ManyToManyField(to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Picture',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False, verbose_name='created')),
                ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, editable=False, verbose_name='modified')),
                ('image', stdimage.models.StdImageField(upload_to=dynamic_filenames.FilePattern(filename_pattern='plant_{uuid:base64}{ext}'))),
                ('plant', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='pictures', to='plants.Plant')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Description',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('description', models.TextField(blank=True)),
                ('duration', models.CharField(blank=True, choices=[('annual', 'annual'), ('biennial', 'biennial'), ('perennial', 'perennial')], max_length=10)),
                ('growth_habit', models.CharField(blank=True, max_length=250)),
                ('growth_rate', models.CharField(blank=True, max_length=250)),
                ('average_height', models.CharField(blank=True, max_length=250)),
                ('maximum_height', models.CharField(blank=True, max_length=250)),
                ('toxicity', models.CharField(blank=True, choices=[('none', 'none'), ('low', 'low'), ('medium', 'medium'), ('high', 'high')], default='none', max_length=6)),
                ('sowing', models.CharField(blank=True, max_length=250)),
                ('ph_maximum', models.DecimalField(blank=True, decimal_places=2, max_digits=3, null=True)),
                ('ph_minimum', models.DecimalField(blank=True, decimal_places=2, max_digits=3, null=True)),
                ('light', models.IntegerField(blank=True, null=True)),
                ('atmospheric_humidity', models.IntegerField(blank=True, null=True)),
                ('growth_months', models.CharField(blank=True, max_length=200)),
                ('bloom_months', models.CharField(blank=True, max_length=200)),
                ('fruit_months', models.CharField(blank=True, max_length=200)),
                ('minimum_precipitation', models.CharField(blank=True, max_length=250)),
                ('maximum_precipitation', models.CharField(blank=True, max_length=250)),
                ('minimum_temperature', models.CharField(blank=True, max_length=250)),
                ('soil_nutriments', models.IntegerField(blank=True, null=True)),
                ('soil_salinity', models.IntegerField(blank=True, null=True)),
                ('soil_texture', models.IntegerField(blank=True, null=True)),
                ('soil_humidity', models.IntegerField(blank=True, null=True)),
                ('plant', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='plants.Plant')),
            ],
        ),
        migrations.CreateModel(
            name='CommonName',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False, verbose_name='created')),
                ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, editable=False, verbose_name='modified')),
                ('name', models.CharField(max_length=200)),
                ('plant', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='common_names', to='plants.Plant')),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
