# Generated by Django 3.0.8 on 2020-07-06 11:30

from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('production', '0270_auto_20200706_1028'),
    ]

    operations = [
        migrations.RemoveConstraint(
            model_name='launch_operation_resources',
            name='Launch_operation_resources_unique_constraint_0',
        ),
        migrations.RemoveConstraint(
            model_name='launch_operation_resources',
            name='Launch_operation_resources_unique_constraint_1',
        ),
        migrations.RemoveConstraint(
            model_name='launch_operation_resources',
            name='Launch_operation_resources_unique_constraint_2',
        ),
        migrations.RemoveConstraint(
            model_name='launch_operation_resources',
            name='Launch_operation_resources_unique_constraint_3',
        ),
        migrations.AddConstraint(
            model_name='launch_operation_resources',
            constraint=models.UniqueConstraint(condition=models.Q(('location', None), ('location_fin', None), ('resource', None)), fields=('launch_operationitem',), name='Launch_operation_resources_unique_constraint_0'),
        ),
        migrations.AddConstraint(
            model_name='launch_operation_resources',
            constraint=models.UniqueConstraint(condition=models.Q(('location', None), ('location_fin', None)), fields=('launch_operationitem', 'resource'), name='Launch_operation_resources_unique_constraint_1'),
        ),
        migrations.AddConstraint(
            model_name='launch_operation_resources',
            constraint=models.UniqueConstraint(condition=models.Q(('location_fin', None), ('resource', None)), fields=('launch_operationitem', 'location'), name='Launch_operation_resources_unique_constraint_2'),
        ),
        migrations.AddConstraint(
            model_name='launch_operation_resources',
            constraint=models.UniqueConstraint(condition=models.Q(location_fin=None), fields=('launch_operationitem', 'location', 'resource'), name='Launch_operation_resources_unique_constraint_3'),
        ),
        migrations.AddConstraint(
            model_name='launch_operation_resources',
            constraint=models.UniqueConstraint(condition=models.Q(('location', None), ('resource', None)), fields=('launch_operationitem', 'location_fin'), name='Launch_operation_resources_unique_constraint_4'),
        ),
        migrations.AddConstraint(
            model_name='launch_operation_resources',
            constraint=models.UniqueConstraint(condition=models.Q(location=None), fields=('launch_operationitem', 'location_fin', 'resource'), name='Launch_operation_resources_unique_constraint_5'),
        ),
        migrations.AddConstraint(
            model_name='launch_operation_resources',
            constraint=models.UniqueConstraint(condition=models.Q(resource=None), fields=('launch_operationitem', 'location', 'location_fin'), name='Launch_operation_resources_unique_constraint_6'),
        ),
        migrations.AddConstraint(
            model_name='launch_operation_resources',
            constraint=models.UniqueConstraint(fields=('launch_operationitem', 'location', 'location_fin', 'resource'), name='Launch_operation_resources_unique_constraint_7'),
        ),
    ]
