# Generated by Django 5.1.3 on 2025-04-01 19:45

import django.core.validators
import django.db.models.deletion
import netbox_proxbox.fields
import taggit.managers
import utilities.json
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('extras', '0122_charfield_null_choices'),
        ('ipam', '0076_natural_ordering'),
        ('netbox_proxbox', '0007_alter_fastapiendpoint_name'),
        ('users', '0009_update_group_perms'),
    ]

    operations = [
        migrations.AlterUniqueTogether(
            name='proxmoxendpoint',
            unique_together=set(),
        ),
        migrations.AddField(
            model_name='fastapiendpoint',
            name='domain',
            field=netbox_proxbox.fields.DomainField(default='localhost', max_length=253),
        ),
        migrations.AddField(
            model_name='fastapiendpoint',
            name='server_side_websocket',
            field=models.BooleanField(default=False),
        ),
        migrations.AddField(
            model_name='fastapiendpoint',
            name='token',
            field=models.CharField(blank=True, max_length=255, null=True),
        ),
        migrations.AddField(
            model_name='fastapiendpoint',
            name='use_websocket',
            field=models.BooleanField(default=False),
        ),
        migrations.AddField(
            model_name='fastapiendpoint',
            name='websocket_domain',
            field=models.CharField(blank=True, max_length=255, null=True),
        ),
        migrations.AddField(
            model_name='fastapiendpoint',
            name='websocket_port',
            field=models.PositiveIntegerField(default=8800, validators=[django.core.validators.MinValueValidator(1), django.core.validators.MaxValueValidator(65535)]),
        ),
        migrations.AddField(
            model_name='netboxendpoint',
            name='domain',
            field=netbox_proxbox.fields.DomainField(default='localhost', max_length=253),
        ),
        migrations.AddField(
            model_name='proxmoxendpoint',
            name='domain',
            field=netbox_proxbox.fields.DomainField(blank=True, max_length=253, null=True),
        ),
        migrations.AlterField(
            model_name='fastapiendpoint',
            name='ip_address',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='+', to='ipam.ipaddress'),
        ),
        migrations.AlterField(
            model_name='netboxendpoint',
            name='ip_address',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='+', to='ipam.ipaddress'),
        ),
        migrations.AlterField(
            model_name='netboxendpoint',
            name='token',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='+', to='users.token'),
        ),
        migrations.AlterField(
            model_name='proxmoxendpoint',
            name='ip_address',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='+', to='ipam.ipaddress'),
        ),
        migrations.AlterField(
            model_name='proxmoxendpoint',
            name='verify_ssl',
            field=models.BooleanField(default=False),
        ),
        migrations.AlterUniqueTogether(
            name='proxmoxendpoint',
            unique_together={('name', 'ip_address', 'domain')},
        ),
        migrations.CreateModel(
            name='SyncProcess',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
                ('created', models.DateTimeField(auto_now_add=True, null=True)),
                ('last_updated', models.DateTimeField(auto_now=True, null=True)),
                ('custom_field_data', models.JSONField(blank=True, default=dict, encoder=utilities.json.CustomFieldJSONEncoder)),
                ('name', models.CharField(max_length=255, unique=True)),
                ('sync_type', models.CharField(default='all', max_length=20)),
                ('status', models.CharField(default='not-started', max_length=20)),
                ('started_at', models.DateTimeField(blank=True, null=True)),
                ('completed_at', models.DateTimeField(blank=True, null=True)),
                ('runtime', models.FloatField(blank=True, null=True)),
                ('tags', taggit.managers.TaggableManager(through='extras.TaggedItem', to='extras.Tag')),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
