<reponame>cmheisel/project-status-dashboard
# -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-07-16 13:33
from __future__ import unicode_literals

from django.db import migrations

from ..services.summaries import fill_updated_at


def migrate_fill_updated_at(apps, schema_editor):
    """Fill the updated_at column if it's not already."""
    ProjectSummary = apps.get_model('dashboard', 'ProjectSummary')
    for summary in ProjectSummary.objects.all():
        summary = fill_updated_at(summary)
        summary.save()


class Migration(migrations.Migration):

    dependencies = [
        ('dashboard', '0002_projectsummary_updated_at'),
    ]

    operations = [
        migrations.RunPython(migrate_fill_updated_at)
    ]

# -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-07-16 13:33
from __future__ import unicode_literals

from django.db import migrations

from ..services.summaries import fill_updated_at


def migrate_fill_updated_at(apps, schema_editor):
    """Fill the updated_at column if it's not already."""
    ProjectSummary = apps.get_model('dashboard', 'ProjectSummary')
    for summary in ProjectSummary.objects.all():
        summary = fill_updated_at(summary)
        summary.save()


class Migration(migrations.Migration):

    dependencies = [
        ('dashboard', '0002_projectsummary_updated_at'),
    ]

    operations = [
        migrations.RunPython(migrate_fill_updated_at)
    ]
# -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2016-07-16 13:33 Fill the updated_at column if it's not already.