# Generated by Django 2.1.2 on 2018-10-29 10:28

import uuid

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


class Migration(migrations.Migration):

    dependencies = [
        ('api', '0003_auto_20181024_0904'),
    ]

    operations = [
        migrations.CreateModel(
            name='CheckTaskJob',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('uuid', models.CharField(max_length=36, unique=True)),
                ('is_scheduled', models.BooleanField(default=True)),
                ('date_scheduled', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.AddField(
            model_name='checktask',
            name='is_deleted',
            field=models.BooleanField(default=False),
        ),
        migrations.AlterField(
            model_name='checktask',
            name='date_created',
            field=models.DateTimeField(auto_now=True),
        ),
        migrations.AlterField(
            model_name='checktask',
            name='interval',
            field=models.PositiveIntegerField(choices=[(60, '1 min'), (120, '2 min'), (300, '5 min'), (600, '10 min'), (1200, '20 min'), (1800, '30 min'), (3600, '1 hour'), (7200, '2 hours'), (21600, '6 hours'), (43200, '12 hours'), (86400, '24 hours')], default=3600),
        ),
        migrations.AlterField(
            model_name='checktask',
            name='url',
            field=models.URLField(),
        ),
        migrations.AlterField(
            model_name='checktask',
            name='uuid',
            field=models.UUIDField(default=uuid.uuid4, unique=True),
        ),
        migrations.AlterField(
            model_name='checktaskresult',
            name='check_task',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.CheckTask'),
        ),
        migrations.AlterField(
            model_name='checktaskresult',
            name='date_received',
            field=models.DateTimeField(auto_now=True),
        ),
        migrations.AlterField(
            model_name='checktaskresult',
            name='response_content',
            field=models.TextField(blank=True),
        ),
        migrations.AlterField(
            model_name='checktaskresult',
            name='response_time',
            field=models.FloatField(validators=[django.core.validators.MinValueValidator(0)]),
        ),
        migrations.AlterField(
            model_name='checktaskresult',
            name='status',
            field=models.CharField(choices=[('UP', 'Up'), ('DOWN', 'Down'), ('DEGRADED', 'Degraded')], max_length=8),
        ),
        migrations.AlterField(
            model_name='checktaskresult',
            name='status_code',
            field=models.PositiveSmallIntegerField(),
        ),
        migrations.RemoveField(
            model_name='checktask',
            name='job_id',
        ),
        migrations.AlterUniqueTogether(
            name='checktask',
            unique_together={('url', 'interval', 'is_deleted')},
        ),
        migrations.AddField(
            model_name='checktaskjob',
            name='check_task',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.CheckTask'),
        ),
    ]
