# -*- coding: utf-8 -*-
# Generated by Django 1.11.3 on 2017-10-27 12:52
from __future__ import unicode_literals

from django.db import migrations


def create_upvotes(apps, schema_editor):
    TranscriptPhraseDownvote = apps.get_model(
        'transcript', 'TranscriptPhraseDownvote'
    )
    TranscriptPhraseVote = apps.get_model(
        'transcript', 'TranscriptPhraseVote'
    )
    for downvote in TranscriptPhraseDownvote.objects.all():
        vote = TranscriptPhraseVote(
            transcript_phrase=downvote.transcript_phrase,
            user=downvote.user,
            upvote=False
        )
        vote.save()


class Migration(migrations.Migration):

    dependencies = [
        ('transcript', '0014_transcriptphrasevote'),
    ]

    operations = [
        migrations.RunPython(create_upvotes)
    ]

# -*- coding: utf-8 -*-
# Generated by Django 1.11.3 on 2017-10-27 12:52
from __future__ import unicode_literals

from django.db import migrations


def create_votes(apps, schema_editor):
    TranscriptPhraseDownvote = apps.get_model(
        'transcript', 'TranscriptPhraseDownvote'
    )
    TranscriptPhraseVote = apps.get_model(
        'transcript', 'TranscriptPhraseVote'
    )
    for downvote in TranscriptPhraseDownvote.objects.all():
        vote = TranscriptPhraseVote(
            transcript_phrase=downvote.transcript_phrase,
            user=downvote.user,
            upvote=False
        )
        vote.save()


class Migration(migrations.Migration):

    dependencies = [
        ('transcript', '0014_transcriptphrasevote'),
    ]

    operations = [
        migrations.RunPython(create_upvotes)
    ]

Rename function