# Generated by Django 3.2.8 on 2021-10-19 14:58

from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='AnalysisTicket',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('case_id', models.UUIDField(editable=False)),
                ('status', models.CharField(choices=[('IP', 'In progress'), ('DE', 'Done'), ('ER', 'Error'), ('PD', 'Paused')], default='IP', max_length=2)),
            ],
        ),
        migrations.AddConstraint(
            model_name='analysisticket',
            constraint=models.UniqueConstraint(condition=models.Q(('status', 'IP')), fields=('case_id',), name='unique_ticket_per_case_for_analysis'),
        ),
    ]
