# -*- coding: utf-8 -*-
# Generated by Django 1.11.26 on 2019-12-16 17:31
from __future__ import unicode_literals

from datetime import datetime

from django.db import migrations, models

def migrate_datetime(apps, schema_editor):
    UserWordRepetition = apps.get_model("le_francais_dictionary", "UserWordRepetition")
    for r in UserWordRepetition.objects.all():
        if r.repetition_date:
            r.repetition_datetime = datetime.combine(r.repetition_date, datetime.min.time())
            r.save()


class Migration(migrations.Migration):

    dependencies = [
        ('le_francais_dictionary', '0023_auto_20191216_1705'),
    ]

    operations = [
        migrations.AddField(
            model_name='userwordrepetition',
            name='repetition_datetime',
            field=models.DateTimeField(null=True),
        ),
        migrations.RunPython(migrate_datetime)
    ]
