# Generated by Django 5.2.5 on 2025-10-20 19:11

import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):
    dependencies = [
        ("generic_notifications", "0005_alter_notificationfrequency_options_and_more"),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        # Rename NotificationFrequency to NotificationFrequencyPreference
        migrations.RenameModel(
            old_name="NotificationFrequency",
            new_name="NotificationFrequencyPreference",
        ),
        migrations.AlterModelOptions(
            name="notificationfrequencypreference",
            options={"verbose_name_plural": "Notification frequency preferences"},
        ),
        migrations.AlterField(
            model_name="notificationfrequencypreference",
            name="user",
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name="notification_frequency_preferences",
                to=settings.AUTH_USER_MODEL,
            ),
        ),
        # Rename DisabledNotificationTypeChannel to NotificationTypeChannelPreference
        migrations.RenameModel(
            old_name="DisabledNotificationTypeChannel",
            new_name="NotificationTypeChannelPreference",
        ),
        migrations.AlterField(
            model_name="notificationtypechannelpreference",
            name="user",
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name="notification_type_channel_preferences",
                to=settings.AUTH_USER_MODEL,
            ),
        ),
        # Add the new enabled field with default=False
        migrations.AddField(
            model_name="notificationtypechannelpreference",
            name="enabled",
            field=models.BooleanField(default=False),
        ),
    ]
