# -*- coding: utf-8 -*-
# Generated by Django 1.10.6 on 2018-03-19 13:40
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='CurrentHouseState',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('house_id', models.CharField(max_length=10)),
                ('qi_severity', models.CharField(default='LOW', max_length=50)),
                ('restart_severity', models.CharField(default='LOW', max_length=50)),
                ('ld_severity', models.CharField(default='LOW', max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='MqttBehaviour',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('event', models.CharField(max_length=20)),
                ('time', models.DateTimeField()),
            ],
        ),
        migrations.CreateModel(
            name='Restart',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('astro_id', models.CharField(max_length=10)),
                ('restart_time', models.DateTimeField()),
                ('reason', models.CharField(max_length=100)),
                ('house', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='HouseHealth.CurrentHouseState')),
            ],
        ),
        migrations.CreateModel(
            name='WifiDisconnection',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('epoch_to', models.IntegerField(default=0)),
                ('time_from', models.DateTimeField()),
                ('epoch_from', models.IntegerField(default=0)),
                ('period', models.IntegerField(default=0)),
                ('time_to', models.DateTimeField()),
                ('restart', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='wifi_disconnections', to='HouseHealth.Restart')),
            ],
        ),
        migrations.AddField(
            model_name='mqttbehaviour',
            name='restart',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='mqtt_behaviour', to='HouseHealth.Restart'),
        ),
    ]
