# Generated by Django 3.2.5 on 2021-08-13 23:36

from django.db import migrations
def gen(apps, schema_editor):
    from data.models.models import AccessoryType, HardwareChannelTypes, Category

    types = ['Relay']

    for type in types:
        cat = AccessoryType.objects.create()
        cat.type = type
        cat.save()

    hardware_channel_types = [('PiPico', 'PiPicoRelay')]

    for (hard, channel) in hardware_channel_types:
        cat = HardwareChannelTypes.objects.create()
        cat.hardware_type = hard
        cat.channel_type = channel
        cat.save()


class Migration(migrations.Migration):

    dependencies = [
        ('data', '0014_auto_20210721_0457'),
    ]

    operations = [
        migrations.RunPython(gen, reverse_code=migrations.RunPython.noop),
    ]
