# -*- coding: utf-8 -*-
# Generated by Django 1.9.3 on 2016-03-19 07:58
from __future__ import unicode_literals

from django.db import migrations


def migrate_score(apps, schema_editor):
    Review = apps.get_model('reviews', 'Review')
    Review.objects.filter(score=2).update(vote='+1')
    Review.objects.filter(score=1).update(vote='+0')
    Review.objects.filter(score=0).update(vote='')
    Review.objects.filter(score=-1).update(vote='-0')
    Review.objects.filter(score=-2).update(vote='-1')


class Migration(migrations.Migration):

    dependencies = [
        ('reviews', '0009_auto_20160319_0753'),
    ]

    operations = [
        migrations.RunPython(migrate_score),
    ]

Add data migrations for vote
Add data migrations for vote
