# Generated by Django 2.2 on 2019-04-11 23:03

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


class Migration(migrations.Migration):

    dependencies = [
        ('survey', '0028_blogpage'),
    ]

    operations = [
        migrations.RemoveField(
            model_name='survey',
            name='has_contradicting',
        ),
        migrations.AddField(
            model_name='survey',
            name='status',
            field=models.IntegerField(choices=[('new', 0), ('success', 1), ('has_contradicting', 2), ('changed_ip', 3), ('solve_too_often', 4), ('zombie', 5)], default=0),
        ),
        migrations.CreateModel(
            name='IPHistory',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ip', models.CharField(default='', max_length=39)),
                ('date', models.DateTimeField(auto_now_add=True)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddIndex(
            model_name='iphistory',
            index=models.Index(fields=['user'], name='survey_iphi_user_id_f46f49_idx'),
        ),
        migrations.AddIndex(
            model_name='iphistory',
            index=models.Index(fields=['ip'], name='survey_iphi_ip_ad2057_idx'),
        ),
        migrations.AddIndex(
            model_name='iphistory',
            index=models.Index(fields=['ip', '-date'], name='survey_iphi_ip_80f5ba_idx'),
        ),
    ]
