# Path: dashboard/services/summaries.py
# def fill_updated_at(summary):
#     """Set updated_at to created_on at 11:59 pm UTC"""
#     summary.updated_at = timezone.now().replace(
#         year=summary.created_on.year,
#         month=summary.created_on.month,
#         day=summary.created_on.day,
#         hour=23,
#         minute=59,
#         second=59,
#     )
#     return summary


from django.db import migrations
from ..services.summaries import fill_updated_at
# -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-07-16 13:33
from __future__ import unicode_literals




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():

# Path: dashboard/services/summaries.py
# def fill_updated_at(summary):
#     """Set updated_at to created_on at 11:59 pm UTC"""
#     summary.updated_at = timezone.now().replace(
#         year=summary.created_on.year,
#         month=summary.created_on.month,
#         day=summary.created_on.day,
#         hour=23,
#         minute=59,
#         second=59,
#     )
#     return summary


# Path: dashboard/migrations/0003_fill_updated_at.py
from django.db import migrations
from ..services.summaries import fill_updated_at

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




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)