# Generated by Django 5.2.1 on 2025-06-10 10:11

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


class Migration(migrations.Migration):

    dependencies = [
        ('extras', '0128_tableconfig'),
        ('netbox_aci', '0002_policygroup_type_cdp_policygroup_cdp_lldp_and_more'),
    ]

    operations = [
        migrations.AlterField(
            model_name='contractfilter',
            name='name',
            field=models.CharField(max_length=50, validators=[django.core.validators.RegexValidator('^[a-zA-Z0-9-_]+$', 'Only alphanumeric, hyphens, and underscores are allowed.')]),
        ),
        migrations.AlterField(
            model_name='contractfilter',
            name='slug',
            field=models.SlugField(blank=True, max_length=100, null=True),
        ),
        migrations.AlterField(
            model_name='contractfilterentry',
            name='name',
            field=models.CharField(max_length=50, validators=[django.core.validators.RegexValidator('^[a-zA-Z0-9-_]+$', 'Only alphanumeric, hyphens, and underscores are allowed.')]),
        ),
        migrations.AlterField(
            model_name='contractfilterentry',
            name='slug',
            field=models.SlugField(blank=True, max_length=100, null=True),
        ),
        migrations.AlterField(
            model_name='contractsubject',
            name='name',
            field=models.CharField(max_length=50, validators=[django.core.validators.RegexValidator('^[a-zA-Z0-9-_]+$', 'Only alphanumeric, hyphens, and underscores are allowed.')]),
        ),
        migrations.AlterField(
            model_name='contractsubject',
            name='slug',
            field=models.SlugField(blank=True, max_length=100, null=True),
        ),
        migrations.AlterField(
            model_name='endpointgroup',
            name='applicationprofile',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, related_name='epg_applicationprofile', to='netbox_aci.applicationprofile'),
        ),
        migrations.AlterField(
            model_name='endpointsecuritygroup',
            name='applicationprofile',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, related_name='esg_applicationprofile', to='netbox_aci.applicationprofile'),
        ),
        migrations.AddConstraint(
            model_name='contractfilter',
            constraint=models.UniqueConstraint(fields=('name', 'contractsubject'), name='unique_filter_per_contractsubject'),
        ),
        migrations.AddConstraint(
            model_name='contractfilter',
            constraint=models.UniqueConstraint(fields=('slug', 'contractsubject'), name='unique_slug_per_contractsubject'),
        ),
        migrations.AddConstraint(
            model_name='contractfilterentry',
            constraint=models.UniqueConstraint(fields=('name', 'contractfilter'), name='unique_entry_per_filter'),
        ),
        migrations.AddConstraint(
            model_name='contractfilterentry',
            constraint=models.UniqueConstraint(fields=('slug', 'contractfilter'), name='unique_slug_per_filter'),
        ),
        migrations.AddConstraint(
            model_name='contractsubject',
            constraint=models.UniqueConstraint(fields=('name', 'contract'), name='unique_subject_per_contract'),
        ),
        migrations.AddConstraint(
            model_name='contractsubject',
            constraint=models.UniqueConstraint(fields=('slug', 'contract'), name='unique_slug_per_contract'),
        ),
    ]
