# -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2017-12-07 15:41
from __future__ import unicode_literals

from django.db import migrations, models


def set_document_title(apps,schema_editor):
    SupportingDocument = apps.get_model('documents','supportingdocument')
    for doc in SupportingDocument.objects.all():
        doc.document_title = doc.title
        doc.save()
    BoardPolicy = apps.get_model('documents','boardpolicy')
    for boardpolicy in BoardPolicy.objects.all():
        boardpolicy.save()

class Migration(migrations.Migration):

    dependencies = [
        ('documents', '0003_administrativeprocedure_policy_supportingdocument'),
    ]

    operations = [
        migrations.AddField(
            model_name='supportingdocument',
            name='document_title',
            field=models.CharField(default='', max_length=200, verbose_name='Title'),
            preserve_default=False,
        ),
        migrations.RunPython(set_document_title),
    ]

# -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2017-12-07 15:41
from __future__ import unicode_literals

from django.db import migrations, models


def set_document_title(apps,schema_editor):
    SupportingDocument = apps.get_model('documents','supportingdocument')
    for doc in SupportingDocument.objects.all():
        doc.document_title = doc.title
        doc.save()
    BoardPolicy = apps.get_model('documents','boardpolicy')
    for boardpolicy in BoardPolicy.objects.all():
        boardpolicy.save()

class Migration(migrations.Migration):

    dependencies = [
        ('documents', '0003_administrativeprocedure_policy_supportingdocument'),
    ]

    operations = [
        migrations.AddField(
            model_name='supportingdocument',
            name='document_title',
            field=models.CharField(default='', max_length=200, verbose_name='Title'),
            preserve_default=False,
        ),
        migrations.RunPython(set_document_title),
    ]

# -*- coding: utf-8 -*- # Generated by Django 1.11.6 on 2017-12-07 15:41