# Generated by Django 3.2.20 on 2023-08-30 14:10

from django.db import migrations


def init_user_notification_emails(apps=None, schema_editor=None):
    User = apps.get_model("core", "User")
    for u in User.objects.all():
        u.additional_json_data["email_notification_categories"] = [
            "INFORMATION",
            "USER_INTERACTION",
        ]
        u.save()


class Migration(migrations.Migration):
    dependencies = [
        ("notify", "0002_auto_20230830_1606"),
    ]

    operations = [
        migrations.RunSQL("truncate table notify_notification cascade;"),
        migrations.RunPython(init_user_notification_emails),
    ]
