# Generated by Django 2.2.28 on 2022-07-26 17:15

from unicodedata import category
from django.db import migrations


def copyBaseRolesToNewTable(apps, schema_editor):
    Old = apps.get_model("kaehmy", "KaehmyBaseRole")
    New = apps.get_model("kaehmy", "BaseRole")
    for bases in Old.objects.all():
        New.objects.create(
            id=bases.id,
            name=bases.name,
            is_board=bases.is_board,
            category=bases.category,
        )


class Migration(migrations.Migration):

    dependencies = [
        ("kaehmy", "0008_baserole"),
    ]

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