# Generated by Django 5.2.12 on 2026-04-01 01:01

from django.db import migrations, models


class Migration(migrations.Migration):
    dependencies = [
        ("netbox_proxbox", "0014_alter_proxmoxstorage_options_and_more"),
        ("virtualization", "0052_gfk_indexes"),
    ]

    operations = [
        migrations.AlterUniqueTogether(
            name="vmbackup",
            unique_together=set(),
        ),
        migrations.AlterField(
            model_name="vmbackup",
            name="vmid",
            field=models.PositiveIntegerField(blank=True, null=True),
        ),
        migrations.AlterField(
            model_name="vmsnapshot",
            name="vmid",
            field=models.PositiveIntegerField(),
        ),
        migrations.AlterField(
            model_name="vmtaskhistory",
            name="pid",
            field=models.PositiveIntegerField(blank=True, null=True),
        ),
        migrations.SeparateDatabaseAndState(
            database_operations=[
                migrations.RunSQL(
                    sql="ALTER TABLE netbox_proxbox_vmtaskhistory DROP COLUMN IF EXISTS pstart, ADD COLUMN pstart timestamp with time zone NULL;",
                    reverse_sql="ALTER TABLE netbox_proxbox_vmtaskhistory DROP COLUMN IF EXISTS pstart, ADD COLUMN pstart integer NULL;",
                ),
            ],
            state_operations=[
                migrations.AlterField(
                    model_name="vmtaskhistory",
                    name="pstart",
                    field=models.DateTimeField(blank=True, null=True),
                ),
            ],
        ),
        migrations.AlterUniqueTogether(
            name="vmbackup",
            unique_together={
                ("storage", "virtual_machine", "subtype", "format", "volume_id", "vmid")
            },
        ),
    ]
