# Generated by Django 4.0.10 on 2023-11-25 09:17

from django.db import migrations


def migrate_role_filter_to_many_to_many(apps, schema_editor):
    Rolefilter = apps.get_model('corptools', 'Rolefilter')

    for rFilter in Rolefilter.objects.all():
        # Take the alliance and corp and add it to the many to many.
        rFilter.corps_filter.add(rFilter.corp_filter)
        rFilter.alliances_filter.add(rFilter.alliance_filter)


class Migration(migrations.Migration):

    dependencies = [
        ('corptools', '0097_rolefilter_alliances_filter_rolefilter_corps_filter'),
    ]

    operations = [
        migrations.RunPython(migrate_role_filter_to_many_to_many)
    ]
