@@ -0,0 +1,831 @@
+# -*- coding: utf-8 -*-%0Afrom __future__ import unicode_literals%0A%0Afrom django.db import migrations, models%0A%0A%0Adef copy_existing_user_profiles(apps, schema_editor):%0A    OldUserProfile = apps.get_model(%22app%22, %22UserProfile%22)  # noqa%0A    UserProfile = apps.get_model(%22profiles%22, %22UserProfile%22)  # noqa%0A%0A    for old_profile in OldUserProfile.objects.all():%0A        profile, _ = UserProfile.objects.get_or_create(user=old_profile.user)%0A        profile.date_of_birth = old_profile.date_of_birth%0A        profile.alias = old_profile.alias%0A        profile.avatar = old_profile.avatar%0A        profile.save()%0A%0A%0Aclass Migration(migrations.Migration):%0A%0A    dependencies = %5B%0A        ('app', '0004_auto_20151105_1300'),%0A        ('profiles', '0001_initial'),%0A    %5D%0A%0A    operations = %5B%0A        migrations.RunPython(copy_existing_user_profiles),%0A    %5D%0A

add data migration for old user profiles