diff --git a/kaehmy/translation.py b/kaehmy/translation.py index 08ca415..0448e17 100644 --- a/kaehmy/translation.py +++ b/kaehmy/translation.py @@ -15,4 +15,4 @@ class PresetRoleTranslationOptions(TranslationOptions): class CustomRoleTranslationOptions(TranslationOptions): """ Class for CustomROle translation options""" - fields = () \ No newline at end of file + fields = () diff --git a/webapp/migrations/0040_migrate_ohlhafvchallenge.py b/webapp/migrations/0040_migrate_ohlhafvchallenge.py new file mode 100644 index 0000000..49f4478 --- /dev/null +++ b/webapp/migrations/0040_migrate_ohlhafvchallenge.py @@ -0,0 +1,32 @@ +# -*- 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), + ] diff --git a/webapp/migrations/0040_delete_ohlhafvchallenge.py b/webapp/migrations/0041_delete_ohlhafvchallenge.py similarity index 85% rename from webapp/migrations/0040_delete_ohlhafvchallenge.py rename to webapp/migrations/0041_delete_ohlhafvchallenge.py index d59df94..cca69ba 100644 --- a/webapp/migrations/0040_delete_ohlhafvchallenge.py +++ b/webapp/migrations/0041_delete_ohlhafvchallenge.py @@ -8,7 +8,7 @@ from django.db import migrations class Migration(migrations.Migration): dependencies = [ - ('webapp', '0039_delete_kaehmy_models'), + ('webapp', '0040_migrate_ohlhafvchallenge'), ] operations = [