# Generated by Django 2.1.2 on 2018-10-23 09:59

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


class Migration(migrations.Migration):

    dependencies = [
        ('airqo_monitor', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Incident',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='date created')),
                ('channel_id', models.IntegerField(db_index=True)),
            ],
            options={
                'db_table': 'incident',
            },
        ),
        migrations.CreateModel(
            name='IncidentMalfunctionReasonLink',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('incident', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='airqo_monitor.Incident')),
            ],
            options={
                'db_table': 'incident_malfunction_reason_link',
            },
        ),
        migrations.CreateModel(
            name='MalfunctionReason',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.TextField()),
                ('description', models.TextField()),
            ],
            options={
                'db_table': 'malfunction_reason',
            },
        ),
        migrations.AlterField(
            model_name='greeting',
            name='when',
            field=models.DateTimeField(auto_now_add=True, verbose_name='date created'),
        ),
        migrations.AddField(
            model_name='incidentmalfunctionreasonlink',
            name='malfunction_reason',
            field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='airqo_monitor.MalfunctionReason'),
        ),
        migrations.AlterUniqueTogether(
            name='incidentmalfunctionreasonlink',
            unique_together={('incident', 'malfunction_reason')},
        ),
    ]
