# Generated by Django 3.1.5 on 2021-01-09 22:26

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='DeclaredSpecies',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
                ('display', models.BooleanField(default=True)),
                ('created_time', models.DateTimeField(auto_now=True)),
                ('is_public', models.BooleanField(default=True)),
                ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Devices',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('added', models.DateTimeField(auto_now=True)),
                ('SDID', models.CharField(max_length=50, verbose_name='Numer idenrtfikacyjny urządzenia')),
            ],
        ),
        migrations.CreateModel(
            name='HumidityDetail',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('fro', models.FloatField()),
                ('to', models.FloatField()),
                ('active', models.BooleanField(verbose_name='Sprawdzać ten parametr?')),
            ],
        ),
        migrations.CreateModel(
            name='States',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('watering', models.BooleanField(default=True)),
                ('humidity', models.BooleanField(default=True)),
                ('temperature', models.BooleanField(default=True)),
                ('lightning', models.BooleanField(default=True)),
                ('device_id', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='data_server.devices')),
                ('species', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='data_server.declaredspecies')),
            ],
        ),
        migrations.CreateModel(
            name='TemperatureDetail',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('fro', models.FloatField()),
                ('to', models.FloatField()),
                ('active', models.BooleanField(verbose_name='Sprawdzać ten parametr?')),
            ],
        ),
        migrations.CreateModel(
            name='TypeOfLightning',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
                ('fro', models.FloatField()),
                ('to', models.FloatField()),
                ('pictogram', models.ImageField(upload_to='')),
            ],
        ),
        migrations.CreateModel(
            name='WateringDetail',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
                ('howMany', models.IntegerField(verbose_name='Co ile dni podlewać?')),
                ('minHumidity', models.FloatField(default=0, verbose_name='Minimalna wilgotność gleby')),
                ('active', models.BooleanField(verbose_name='Sprawdzać ten parametr?')),
            ],
        ),
        migrations.CreateModel(
            name='UserConfigurations',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
                ('author', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to=settings.AUTH_USER_MODEL)),
                ('device_id', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='data_server.devices')),
                ('overview', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='data_server.states')),
                ('species', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='data_server.declaredspecies')),
            ],
        ),
        migrations.CreateModel(
            name='LightningDetail',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('active', models.BooleanField(verbose_name='Sprawdzać ten parametr?')),
                ('typeof', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='data_server.typeoflightning')),
            ],
        ),
        migrations.AddField(
            model_name='declaredspecies',
            name='humidity',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='data_server.humiditydetail'),
        ),
        migrations.AddField(
            model_name='declaredspecies',
            name='light',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='data_server.lightningdetail'),
        ),
        migrations.AddField(
            model_name='declaredspecies',
            name='temperature',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='data_server.temperaturedetail'),
        ),
    ]
