# Generated by Django 2.2.4 on 2019-09-18 12:49

from django.db import migrations
from django.contrib.auth.models import User


def forwards(apps, schema_editor):
    for user in User.objects.filter(username__contains='-'):
        new_username = user.username.replace('-', '.')
        print('\nrenaming', user.username, 'to', new_username)
        user.username = new_username
        user.save()
        print('saved!')


class Migration(migrations.Migration):

    dependencies = [
        ('search', '0004_collection_groups'),
    ]

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

# Generated by Django 2.2.4 on 2019-09-18 12:49

from django.db import migrations
from django.contrib.auth.models import User


def forwards(apps, schema_editor):
    for user in User.objects.filter(username__contains='-'):
        new_username = user.username.replace('-', '.')
        print('\nrenaming', user.username, 'to', new_username)
        user.username = new_username
        user.save()
        print('saved!')


class Migration(migrations.Migration):

    dependencies = [
        ('search', '0004_collection_groups'),
    ]

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

# Generated by Django 2.2.4 on 2019-09-18 12:49