# Generated by Django 5.1.9 on 2025-06-11 09:15

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


class Migration(migrations.Migration):

    dependencies = [
        ("access", "0016_remove_tenant_slug_alter_tenant_manager_and_more"),
        ("itam", "0017_remove_deviceoperatingsystem_is_global_and_more"),
    ]

    operations = [
        migrations.RemoveField(
            model_name="devicesoftware",
            name="is_global",
        ),
        migrations.AlterField(
            model_name="devicesoftware",
            name="action",
            field=models.IntegerField(
                blank=True,
                choices=[(1, "Install"), (0, "Remove")],
                help_text="Action to perform",
                null=True,
                verbose_name="Action",
            ),
        ),
        migrations.AlterField(
            model_name="devicesoftware",
            name="id",
            field=models.AutoField(
                help_text="ID of the item",
                primary_key=True,
                serialize=False,
                unique=True,
                verbose_name="ID",
            ),
        ),
        migrations.AlterField(
            model_name="devicesoftware",
            name="installedversion",
            field=models.ForeignKey(
                blank=True,
                help_text="Version that is installed",
                null=True,
                on_delete=django.db.models.deletion.PROTECT,
                related_name="installedversion",
                to="itam.softwareversion",
                verbose_name="Installed Version",
            ),
        ),
        migrations.AlterField(
            model_name="devicesoftware",
            name="model_notes",
            field=models.TextField(
                blank=True,
                help_text="Tid bits of information",
                null=True,
                verbose_name="Notes",
            ),
        ),
        migrations.AlterField(
            model_name="devicesoftware",
            name="organization",
            field=models.ForeignKey(
                help_text="Tenant this belongs to",
                on_delete=django.db.models.deletion.CASCADE,
                related_name="+",
                to="access.tenant",
                validators=[
                    access.models.tenancy_abstract.TenancyAbstractModel.validatate_organization_exists
                ],
                verbose_name="Tenant",
            ),
        ),
        migrations.AlterField(
            model_name="devicesoftware",
            name="software",
            field=models.ForeignKey(
                help_text="Software Name",
                on_delete=django.db.models.deletion.PROTECT,
                to="itam.software",
                verbose_name="Software",
            ),
        ),
        migrations.AlterField(
            model_name="devicesoftware",
            name="version",
            field=models.ForeignKey(
                blank=True,
                help_text="Version to install",
                null=True,
                on_delete=django.db.models.deletion.PROTECT,
                to="itam.softwareversion",
                verbose_name="Desired Version",
            ),
        ),
    ]
