# Generated by Django 2.2.5 on 2019-09-23 15:12

from django.db import migrations


def forward(apps, schema_editor):
    MicrosoftAccount = apps.get_model('sites_microsoft_auth', 'MicrosoftAccount')
    XboxLiveAccount = apps.get_model('sites_microsoft_auth', 'XboxLiveAccount')
    for account in MicrosoftAccount.objects.all():
        account.site = account.user.site
        account.save()
    for account in XboxLiveAccount.objects.all():
        account.site = account.user.site
        account.save()


class Migration(migrations.Migration):

    dependencies = [
        ('sites_microsoft_auth', '0003_auto_20190923_1511'),
    ]

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