# Generated by Django 3.0.3 on 2020-02-19 05:00

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


class Migration(migrations.Migration):

    dependencies = [
        ('planing', '0100_delete_operation_locations'),
    ]

    operations = [
        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.AddField(
            model_name='operation_refs',
            name='props',
            field=bitfield.models.BitField((('inner_routing', 'Связь операций внутри товарной позиции'), ('outer_routing', 'Связь операций между товарными позициями')), db_index=True, default=0),
        ),
        migrations.AlterUniqueTogether(
            name='operation_refs',
            unique_together={('child', 'parent', 'props')},
        ),
        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', 'props', 'parent'), name='Operation_refs_unique_constraint_1'),
        ),
    ]
