# Generated by Django 5.0.9 on 2024-10-03 14:11

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


class Migration(migrations.Migration):

    dependencies = [
        ('circuits', '0044_circuit_groups'),
        ('dcim', '0190_nested_modules'),
        ('extras', '0121_customfield_related_object_filter'),
        ('sop_phone', '0003_phonemaintainer_shipping_address'),
    ]

    operations = [
        migrations.RemoveConstraint(
            model_name='phonedid',
            name='sop_phone_phonedid_end_greater_than_start',
        ),
        migrations.AlterField(
            model_name='phonedelivery',
            name='provider',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.RESTRICT, to='circuits.provider'),
        ),
        migrations.AlterField(
            model_name='phonedelivery',
            name='site',
            field=models.ForeignKey(on_delete=django.db.models.deletion.RESTRICT, to='dcim.site'),
        ),
        migrations.AlterField(
            model_name='phonemaintainer',
            name='name',
            field=models.CharField(unique=True),
        ),
        migrations.AddConstraint(
            model_name='phonedid',
            constraint=models.CheckConstraint(check=models.Q(('end__gte', models.F('start')), ('start__biabs__bilog__bifloor', models.F('end'))), name='sop_phone_phonedid_end_greater_than_start', violation_error_message='End number must be greater than or equal to start number.'),
        ),
    ]
