# Generated by Django 2.2.24 on 2021-08-04 17:14

from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('hire_orders', '0002_hireorder_table_flow_data'),
    ]

    operations = [
        migrations.AddField(
            model_name='hireorder',
            name='sha1',
            field=models.CharField(
                db_index=True,
                help_text='Хэш, взятый по raw_data',
                max_length=40,
                null=True,
            ),
        ),
        migrations.AddConstraint(
            model_name='hireorder',
            constraint=models.UniqueConstraint(
                condition=models.Q(_negated=True, status='closed'),
                fields=('created_by', 'sha1'),
                name='unique_active_hire_order',
            ),
        ),
    ]
