# Generated by Django 4.2.19 on 2025-02-24 21:20

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


class Migration(migrations.Migration):
    dependencies = [
        ("virtualization", "0030_alter_virtualmachine_local_config_context_data_owner_content_type_and_more"),
        ("dcim", "0067_controllermanageddevicegroup_tenant"),
        ("ipam", "0050_vlangroup_range"),
    ]

    operations = [
        migrations.AddField(
            model_name="vrf",
            name="virtual_device_contexts",
            field=models.ManyToManyField(
                related_name="vrfs", through="ipam.VRFDeviceAssignment", to="dcim.virtualdevicecontext"
            ),
        ),
        migrations.AddField(
            model_name="vrfdeviceassignment",
            name="virtual_device_context",
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name="vrf_assignments",
                to="dcim.virtualdevicecontext",
            ),
        ),
        migrations.AlterUniqueTogether(
            name="vrfdeviceassignment",
            unique_together={
                ("vrf", "virtual_device_context"),
                ("vrf", "virtual_machine"),
                ("vrf", "device"),
            },
        ),
    ]
