# -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2016-12-30 10:55
from __future__ import unicode_literals

from django.db import migrations


def populate_original(apps, schema_editor):
    Document = apps.get_model("documents", "Document")
    db_alias = schema_editor.connection.alias
    for document in Document.objects.using(db_alias).all():
        document.original_filename = document.name
        document.save()


class Migration(migrations.Migration):

    dependencies = [
        ('documents', '0002_auto_20161230_1051'),
    ]

    operations = [
        migrations.RunPython(populate_original)
    ]
