@@ -0,0 +1,1200 @@
+# -*- coding: utf-8 -*-%0A# Generated by Django 1.10.8 on 2018-10-29 15:10%0Afrom __future__ import unicode_literals%0A%0Afrom django.db import migrations%0A%0A%0Adef move_popolo_person_gfks_to_people_person(apps, schema_editor):%0A    PeoplePerson = apps.get_model(%22people%22, %22Person%22)%0A    PopoloPerson = apps.get_model(%22popolo%22, %22Person%22)%0A    ContentType = apps.get_model(%22contenttypes%22, %22ContentType%22)%0A%0A    models = %5B%0A        apps.get_model(%22popolo%22, %22Link%22),%0A        apps.get_model(%22popolo%22, %22OtherName%22),%0A        apps.get_model(%22popolo%22, %22ContactDetail%22),%0A        apps.get_model(%22popolo%22, %22Identifier%22),%0A        apps.get_model(%22popolo%22, %22Source%22),%0A    %5D%0A%0A    people_person_ct = ContentType.objects.get_for_model(PeoplePerson).pk%0A    popolo_person_ct = ContentType.objects.get_for_model(PopoloPerson).pk%0A%0A    for model in models:%0A        model.objects.filter(content_type=popolo_person_ct).update(%0A            content_type=people_person_ct%0A        )%0A%0A%0Aclass Migration(migrations.Migration):%0A%0A    dependencies = %5B(%22people%22, %220005_move_person_image_fk_to_person_app%22)%5D%0A%0A    operations = %5B%0A        migrations.RunPython(%0A            move_popolo_person_gfks_to_people_person, migrations.RunPython.noop%0A        )%0A    %5D%0A

Move GenericForeignKeys from popolo.Person to people.Person