# Generated by Django 5.0.5 on 2024-05-16 15:23
import django.db.models.deletion
from django.db import migrations
from django.db import models


class Migration(migrations.Migration):
    dependencies = [
        ("contenttypes", "0002_remove_content_type_name"),
        ("ipfabric_netbox", "0004_ipfabricsync_auto_merge"),
    ]

    operations = [
        migrations.AlterField(
            model_name="ipfabricrelationshipfield",
            name="source_model",
            field=models.ForeignKey(
                limit_choices_to=models.Q(
                    models.Q(
                        ("app_label", "dcim"),
                        ("app_label", "ipam"),
                        ("app_label", "tenancy"),
                        models.Q(
                            ("app_label", "contenttypes"), ("model", "contenttype")
                        ),
                        _connector="OR",
                    )
                ),
                on_delete=django.db.models.deletion.PROTECT,
                related_name="ipfabric_transform_fields",
                to="contenttypes.contenttype",
            ),
        ),
        migrations.AlterField(
            model_name="ipfabrictransformmap",
            name="target_model",
            field=models.ForeignKey(
                limit_choices_to=models.Q(
                    models.Q(
                        models.Q(("app_label", "dcim"), ("model", "site")),
                        models.Q(("app_label", "dcim"), ("model", "manufacturer")),
                        models.Q(("app_label", "dcim"), ("model", "platform")),
                        models.Q(("app_label", "dcim"), ("model", "devicerole")),
                        models.Q(("app_label", "dcim"), ("model", "devicetype")),
                        models.Q(("app_label", "dcim"), ("model", "device")),
                        models.Q(("app_label", "dcim"), ("model", "virtualchassis")),
                        models.Q(("app_label", "dcim"), ("model", "interface")),
                        models.Q(("app_label", "ipam"), ("model", "vlan")),
                        models.Q(("app_label", "ipam"), ("model", "vrf")),
                        models.Q(("app_label", "ipam"), ("model", "prefix")),
                        models.Q(("app_label", "ipam"), ("model", "ipaddress")),
                        models.Q(
                            ("app_label", "contenttypes"), ("model", "contenttype")
                        ),
                        models.Q(("app_label", "tenancy"), ("model", "tenant")),
                        _connector="OR",
                    )
                ),
                on_delete=django.db.models.deletion.PROTECT,
                related_name="+",
                to="contenttypes.contenttype",
            ),
        ),
    ]
