# -*- coding: utf-8 -*-
# Generated by Django 1.10.1 on 2017-03-12 15:44
from __future__ import unicode_literals

from django.db import migrations

def create_followings_field(apps, schema_editor):
    Man = apps.get_model("followers", "Man")
    for man in Man.objects.all():
    	ids = man.follow_ids.split()
    	for i in ids:
    		man.followings.add(Man.objects.get(id=int(i)))




class Migration(migrations.Migration):

    dependencies = [
        ('followers', '0003_man_followings'),
    ]

    operations = [
    	migrations.RunPython(create_followings_field)
    ]
