# -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2018-01-28 21:31
from __future__ import unicode_literals

from django.db import migrations


def migrate_ohlhafv(apps, schema_editor):
    NewOhlhafvChallenge = apps.get_model('ohlhafv', 'OhlhafvChallenge')
    OldOhlhafvChallenge = apps.get_model('webapp', 'OhlhafvChallenge')
    for challenge in OldOhlhafvChallenge.objects.all():
        NewOhlhafvChallenge.objects.create(
            id=challenge.id,
            challenger=challenge.challenger,
            victim=challenge.victim,
            challenger_email=challenge.challenger_email,
            victim_email=challenge.victim_email,
            series=challenge.series,
            message=challenge.message,
        )


class Migration(migrations.Migration):

    dependencies = [
        ('webapp', '0039_delete_kaehmy_models'),
        ('ohlhafv', '0001_initial'),
    ]

    operations = [
        migrations.RunPython(migrate_ohlhafv),
    ]
