# Generated by Django 5.2.8 on 2025-11-14 20:43

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


class Migration(migrations.Migration):

    dependencies = [
        ("nodes", "0043_nodeconfigurationjob"),
    ]

    operations = [
        migrations.CreateModel(
            name="NodeProfile",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("is_seed_data", models.BooleanField(default=False, editable=False)),
                ("is_user_data", models.BooleanField(default=False, editable=False)),
                ("is_deleted", models.BooleanField(default=False, editable=False)),
                ("name", models.CharField(max_length=150, unique=True)),
                (
                    "data",
                    models.JSONField(
                        blank=True,
                        default=dict,
                        help_text="Key/value pairs exported to automation tools and sigils.",
                    ),
                ),
            ],
            options={
                "verbose_name": "Node Profile",
                "verbose_name_plural": "Node Profiles",
                "ordering": ["name"],
            },
        ),
        migrations.AlterModelOptions(
            name="nodemanager",
            options={
                "verbose_name": "Node Manager",
                "verbose_name_plural": "Node Managers",
            },
        ),
        migrations.AddField(
            model_name="node",
            name="profile",
            field=models.OneToOneField(
                blank=True,
                help_text="Optional profile providing metadata for automation tasks.",
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                related_name="node",
                to="nodes.nodeprofile",
            ),
        ),
    ]
