# -*- coding: utf-8 -*-
# Generated by Django 1.9.10 on 2016-12-08 11:13
from __future__ import unicode_literals

from django.db import migrations

from company import helpers


def ensure_verification_code(apps, schema_editor):
    Company = apps.get_model("company", "Company")
    for company in Company.objects.filter(verification_code=''):
        company.verification_code = helpers.generate_verification_code()
        company.save()



class Migration(migrations.Migration):

    dependencies = [
        ('company', '0020_auto_20161208_1056'),
    ]

    operations = [
        migrations.RunPython(ensure_verification_code),
    ]

[((13, 36, 13, 72), 'company.helpers.generate_verification_code', 'helpers.generate_verification_code', ({}, {}), '()', False, 'from company import helpers\n'), ((25, 8, 25, 54), 'django.db.migrations.RunPython', 'migrations.RunPython', ({(25, 29, 25, 53): 'ensure_verification_code'}, {}), '(ensure_verification_code)', False, 'from django.db import migrations\n')]