# -*- coding: utf-8 -*-
# Generated by Django 1.11.13 on 2018-05-08 19:56
from __future__ import unicode_literals
from __future__ import absolute_import

from django.db import migrations



def noop(*args, **kwargs):
    pass


def _convert_emailed_to_array_field(apps, schema_editor):
    BillingRecord = apps.get_model('accounting', 'BillingRecord')
    for record in BillingRecord.objects.all():
        if record.emailed_to != '':
            record.emailed_to_list = record.emailed_to.split(',')
            record.save()

    WireBillingRecord = apps.get_model('accounting', 'WireBillingRecord')
    for wirerecord in WireBillingRecord.objects.all():
        if wirerecord.emailed_to != '':
            wirerecord.emailed_to_list = wirerecord.emailed_to.split(',')
            wirerecord.save()


class Migration(migrations.Migration):

    dependencies = [
        ('accounting', '0025_auto_20180508_1952'),
    ]

    operations = [
        migrations.RunPython(_convert_emailed_to_array_field, reverse_code=noop)
    ]

[((35, 8, 35, 80), 'django.db.migrations.RunPython', 'migrations.RunPython', (), '', False, 'from django.db import migrations\n')]