# Generated by Django 3.0.8 on 2020-07-19 12:05

from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('planing', '0207_operation_refs_history'),
    ]

    operations = [
        migrations.RemoveConstraint(
            model_name='operation_operation',
            name='Operation_operation_unique_constraint_0',
        ),
        migrations.RemoveConstraint(
            model_name='operation_operation',
            name='Operation_operation_unique_constraint_1',
        ),
        migrations.AddConstraint(
            model_name='operation_operation',
            constraint=models.UniqueConstraint(condition=models.Q(('qty', None), ('version', None)), fields=('num', 'operation', 'production_operation', 'props'), name='Operation_operation_unique_constraint_0'),
        ),
        migrations.AddConstraint(
            model_name='operation_operation',
            constraint=models.UniqueConstraint(condition=models.Q(version=None), fields=('num', 'operation', 'production_operation', 'props', 'qty'), name='Operation_operation_unique_constraint_1'),
        ),
        migrations.AddConstraint(
            model_name='operation_operation',
            constraint=models.UniqueConstraint(condition=models.Q(qty=None), fields=('num', 'operation', 'production_operation', 'props', 'version'), name='Operation_operation_unique_constraint_2'),
        ),
        migrations.AddConstraint(
            model_name='operation_operation',
            constraint=models.UniqueConstraint(fields=('num', 'operation', 'production_operation', 'props', 'qty', 'version'), name='Operation_operation_unique_constraint_3'),
        ),
    ]
