# Generated by Django 3.0.2 on 2020-03-22 15:53

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


class Migration(migrations.Migration):

    dependencies = [
        ('flowmeter', '0047_auto_20200321_1711'),
    ]

    operations = [
        migrations.CreateModel(
            name='AlarmLogReader',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('state', models.CharField(default='unread', max_length=16)),
            ],
        ),
        migrations.RemoveIndex(
            model_name='alarmlog',
            name='state_index',
        ),
        migrations.RemoveField(
            model_name='alarmlog',
            name='state',
        ),
        migrations.AddField(
            model_name='alarmlogreader',
            name='alarm_log',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='flowmeter.AlarmLog'),
        ),
        migrations.AddField(
            model_name='alarmlogreader',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='flowmeter.User'),
        ),
        migrations.AddIndex(
            model_name='alarmlogreader',
            index=models.Index(fields=['user', 'state'], name='user_state_index'),
        ),
    ]
