# Generated by Django 5.2.8 on 2025-11-18 22:28

from django.db import migrations, models


def mark_local_nodes_trusted(apps, schema_editor):
    Node = apps.get_model("nodes", "Node")
    Node.objects.filter(current_relation="SELF").update(trusted=True)


class Migration(migrations.Migration):

    dependencies = [
        ("nodes", "0044_nodeprofile_alter_nodemanager_options_node_profile"),
    ]

    operations = [
        migrations.AddField(
            model_name="node",
            name="trusted",
            field=models.BooleanField(
                default=False,
                help_text="Mark the node as trusted for network interactions.",
            ),
        ),
        migrations.RunPython(mark_local_nodes_trusted, migrations.RunPython.noop),
    ]
