# -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2017-07-05 23:41
from __future__ import unicode_literals

from django.db import migrations


def populate_code(apps, schema_editor):
    Problem = apps.get_model('problems', 'Problem')
    for problem in Problem.objects.all():
        problem.code = problem.pk
        problem.save()


class Migration(migrations.Migration):

    dependencies = [
        ('problems', '0100_problem_code'),
    ]

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