# Generated by Django 3.1.1 on 2021-03-15 18:46

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='Col',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('size', models.FloatField()),
            ],
        ),
        migrations.CreateModel(
            name='Map',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
                ('current_water', models.IntegerField(default=0)),
                ('time_created', models.DateTimeField()),
                ('notes', models.TextField()),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Part',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
                ('x', models.IntegerField()),
                ('y', models.IntegerField()),
                ('map', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='maps.map')),
            ],
        ),
        migrations.CreateModel(
            name='Row',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('size', models.FloatField()),
                ('master', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='maps.part')),
            ],
        ),
        migrations.CreateModel(
            name='Watered',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateField()),
                ('number', models.IntegerField()),
                ('col', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='maps.col')),
                ('row', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='maps.row')),
            ],
        ),
        migrations.AddField(
            model_name='col',
            name='master',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='maps.part'),
        ),
    ]
