<filename>apps/authentication/migrations/0040_auto_20190801_2200.py<gh_stars>10-100
# Generated by Django 2.1.9 on 2019-08-01 20:00

from django.db import migrations


from apps.authentication.constants import GroupType, RoleType


def load_data(apps, schema_editor):
    GroupRole = apps.get_model("authentication", "GroupRole")

    for role_type in RoleType.values:
        GroupRole.objects.create(role_type=role_type)


def revert_data(apps, schema_editor):
    pass


class Migration(migrations.Migration):

    dependencies = [("authentication", "0039_auto_20190801_2159")]

    operations = [migrations.RunPython(load_data, revert_data)]
