# Generated by Django 4.2.15 on 2024-09-28 05:27

from django.db import migrations


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ("NEMO", "0054_documents_update_max_length"),
    ]

    def set_mqtt_interlock_category_forward(apps, schema_editor):
        InterlockCardCategory = apps.get_model("NEMO", "InterlockCardCategory")
        InterlockCardCategory.objects.get_or_create(name="WAGOModbusTcp", key="wago_modbus_tcp")

    def set_mqtt_interlock_category_reverse(apps, schema_editor):
        InterlockCardCategory = apps.get_model("NEMO", "InterlockCardCategory")
        InterlockCardCategory.objects.filter(key="wago_modbus_tcp").delete()

    operations = [
        migrations.RunPython(set_mqtt_interlock_category_forward, set_mqtt_interlock_category_reverse),
    ]
