# Generated by Django 2.2.26 on 2022-10-11 14:35

import django
from django.db import migrations, models


class Migration(migrations.Migration):
    dependencies = [
        ('a2_rbac', '0032_copy_operations_data'),
    ]

    operations = [
        migrations.RemoveField(
            model_name='permission',
            name='operation',
        ),
        migrations.RenameField(
            model_name='permission',
            old_name='operation_new',
            new_name='operation',
        ),
        migrations.AlterField(
            model_name='permission',
            name='operation',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE, to='a2_rbac.Operation', verbose_name='operation'
            ),
        ),
        migrations.AddConstraint(
            model_name='permission',
            constraint=models.UniqueConstraint(
                condition=models.Q(ou__isnull=True),
                fields=('operation', 'target_ct', 'target_id'),
                name='null_ou_uniq_idx',
            ),
        ),
    ]
