# Generated by Django 3.0.6 on 2020-08-18 21:05
from django.db import migrations

# This does not use historical models, but the current version of Permission
# It might break if models change in the future.


def create_initial_permissions(apps, schema_editor):
    from django.contrib.auth.models import Group, Permission
    from django.contrib.contenttypes.models import ContentType

    group_content_type = ContentType.objects.get_for_model(Group)
    Permission.objects.create(
        name="Publish event for group",
        codename="publish_event_for_group",
        content_type=group_content_type,
    )


class Migration(migrations.Migration):
    dependencies = [
        ("user_management", "0001_initial"),
        ("guardian", "0001_initial"),
    ]

    operations = [
        migrations.RunPython(create_initial_permissions),
    ]
