<reponame>prattl/teamfinder-web<filename>api/tf_auth/migrations/0009_populate_username.py
# -*- coding: utf-8 -*-
# Generated by Django 1.10.1 on 2017-04-17 00:30
from __future__ import unicode_literals

from django.db import migrations


def forwards(apps, schema_editor):
    TFUser = apps.get_model('tf_auth.TFUser')

    for user in TFUser.objects.all():
        try:
            user.username = user.player.username
        except:
            pass


class Migration(migrations.Migration):

    dependencies = [
        ('tf_auth', '0008_auto_20170417_0012'),
    ]

    operations = [
        migrations.RunPython(forwards, migrations.RunPython.noop)
    ]

# -*- coding: utf-8 -*-
# Generated by Django 1.10.1 on 2017-04-17 00:30
from __future__ import unicode_literals

from django.db import migrations


def forwards(apps, schema_editor):
    TFUser = apps.get_model('tf_auth.TFUser')

    for user in TFUser.objects.all():
        try:
            user.username = user.player.username
        except:
            pass


class Migration(migrations.Migration):

    dependencies = [
        ('tf_auth', '0008_auto_20170417_0012'),
    ]

    operations = [
        migrations.RunPython(forwards, migrations.RunPython.noop)
    ]
# -*- coding: utf-8 -*- # Generated by Django 1.10.1 on 2017-04-17 00:30