# -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2016-10-30 15:15
from __future__ import unicode_literals

import json

from django.db import migrations


def move_fields(apps, schema_editor):
    for hero in apps.get_model("heroes", "Hero").objects.all():

        data = json.loads(hero.data)

        data['equipment'] = json.loads(hero.equipment)
        data['bag'] = json.loads(hero.bag)
        data['actual_bills'] = json.loads(hero.actual_bills)

        hero.data = json.dumps(data, ensure_ascii=False)

        hero.save()



class Migration(migrations.Migration):

    dependencies = [
        ('heroes', '0014_auto_20161019_1613'),
    ]

    operations = [
        migrations.RunPython(move_fields)
    ]

3dd89e3cde9fd70cc1bdae7a57b9d04fc537e5d7
<mask token>


class Migration(migrations.Migration):
    <mask token>
    <mask token>

<mask token>


class Migration(migrations.Migration):
    dependencies = [('heroes', '0014_auto_20161019_1613')]
    operations = [migrations.RunPython(move_fields)]

<mask token>


def move_fields(apps, schema_editor):
    for hero in apps.get_model('heroes', 'Hero').objects.all():
        data = json.loads(hero.data)
        data['equipment'] = json.loads(hero.equipment)
        data['bag'] = json.loads(hero.bag)
        data['actual_bills'] = json.loads(hero.actual_bills)
        hero.data = json.dumps(data, ensure_ascii=False)
        hero.save()


class Migration(migrations.Migration):
    dependencies = [('heroes', '0014_auto_20161019_1613')]
    operations = [migrations.RunPython(move_fields)]

from __future__ import unicode_literals
import json
from django.db import migrations


def move_fields(apps, schema_editor):
    for hero in apps.get_model('heroes', 'Hero').objects.all():
        data = json.loads(hero.data)
        data['equipment'] = json.loads(hero.equipment)
        data['bag'] = json.loads(hero.bag)
        data['actual_bills'] = json.loads(hero.actual_bills)
        hero.data = json.dumps(data, ensure_ascii=False)
        hero.save()


class Migration(migrations.Migration):
    dependencies = [('heroes', '0014_auto_20161019_1613')]
    operations = [migrations.RunPython(move_fields)]

# -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2016-10-30 15:15
from __future__ import unicode_literals

import json

from django.db import migrations


def move_fields(apps, schema_editor):
    for hero in apps.get_model("heroes", "Hero").objects.all():

        data = json.loads(hero.data)

        data['equipment'] = json.loads(hero.equipment)
        data['bag'] = json.loads(hero.bag)
        data['actual_bills'] = json.loads(hero.actual_bills)

        hero.data = json.dumps(data, ensure_ascii=False)

        hero.save()



class Migration(migrations.Migration):

    dependencies = [
        ('heroes', '0014_auto_20161019_1613'),
    ]

    operations = [
        migrations.RunPython(move_fields)
    ]
