# Generated by Django 3.0.8 on 2020-07-12 18:42

import bitfield.models
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('production', '0279_auto_20200712_0914'),
        ('ckk', '0230_auto_20200708_1517'),
        ('planing', '0190_auto_20200709_0521'),
    ]

    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.RemoveConstraint(
            model_name='operation_refs',
            name='Operation_refs_unique_constraint_0',
        ),
        migrations.RemoveConstraint(
            model_name='operation_refs',
            name='Operation_refs_unique_constraint_1',
        ),
        migrations.RemoveConstraint(
            model_name='operation_refs',
            name='Operation_refs_unique_constraint_2',
        ),
        migrations.RemoveConstraint(
            model_name='operation_refs',
            name='Operation_refs_unique_constraint_3',
        ),
        migrations.RemoveField(
            model_name='operation_operation',
            name='props',
        ),
        migrations.RemoveField(
            model_name='operation_refs',
            name='parent_real',
        ),
        migrations.AlterField(
            model_name='operation_refs',
            name='props',
            field=bitfield.models.BitField((('inner_routing', 'Связь операций внутри товарной позиции'), ('outer_routing', 'Связь операций между товарными позициями'), ('product_order_routing', 'Связи в блоке задания на производство'), ('product_making', 'Связи выпуска'), ('product_making_block', 'Блок операций выпуска, удаляется как одно целое для правильного удаления релизов')), db_index=True, default=0),
        ),
        migrations.AlterUniqueTogether(
            name='operation_item_add',
            unique_together={('item', 'item_full_name', 'launch')},
        ),
        migrations.AddConstraint(
            model_name='operation_operation',
            constraint=models.UniqueConstraint(condition=models.Q(version=None), fields=('operation', 'production_operation'), name='Operation_operation_unique_constraint_0'),
        ),
        migrations.AddConstraint(
            model_name='operation_operation',
            constraint=models.UniqueConstraint(fields=('operation', 'production_operation', 'version'), name='Operation_operation_unique_constraint_1'),
        ),
        migrations.AddConstraint(
            model_name='operation_refs',
            constraint=models.UniqueConstraint(condition=models.Q(parent=None), fields=('child', 'props'), name='Operation_refs_unique_constraint_0'),
        ),
        migrations.AddConstraint(
            model_name='operation_refs',
            constraint=models.UniqueConstraint(fields=('child', 'parent', 'props'), name='Operation_refs_unique_constraint_1'),
        ),
        migrations.RemoveField(
            model_name='operation_item_add',
            name='operations_item',
        ),
    ]
