# Generated by Django 2.0.6 on 2018-07-31 09:13

from django.db import migrations


def generate_profiles(apps, schema_editor):
    EventComProfile = apps.get_model("pretalx_com", "EventComProfile")
    Event = apps.get_model("event", "Event")
    for event in Event.objects.all():
        EventComProfile.objects.create(event=event)


def delete_profiles(apps, schema_editor):
    EventComProfile = apps.get_model("pretalx_com", "EventComProfile")
    EventComProfile.objects.all().delete()


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

    operations = [migrations.RunPython(generate_profiles, delete_profiles)]
