# Generated by Django 2.1.15 on 2020-03-03 12:59

from django.db import migrations

def forwards(apps, schema_editor):
    SchoolClass = apps.get_model('users', 'SchoolClass')
    UserSchoolClassConnection = apps.get_model('users', 'UserSchoolClassConnection')

    for school_class in SchoolClass.objects.all():
        for user in school_class.users.all():
            UserSchoolClassConnection.objects.create(user=user, school_class=school_class, active=True)


class Migration(migrations.Migration):
    dependencies = [
        ('users', '0012_auto_20200303_1258'),
    ]

    operations = [
        migrations.RunPython(forwards)
    ]
