# Generated by Django 5.0.4 on 2024-08-14 20:46

from django.db import migrations


def create_missing_guild_settings(apps, scheme_editor):
    SavedGuilds = apps.get_model("home", "SavedGuilds")
    GuildSettings = apps.get_model("home", "GuildSettings")

    for saved_guild in SavedGuilds.objects.all():
        GuildSettings.objects.get_or_create(guild_id=saved_guild.guild_id)


class Migration(migrations.Migration):

    dependencies = [
        ('home', '0021_alter_guildsettings_options_and_more'),
    ]

    operations = [
        migrations.RunPython(create_missing_guild_settings),
    ]
