# Generated by Copilot on 2026-01-06

# Django
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ("indy_hub", "0063_disable_materialexchangeconfig_default_permissions"),
    ]

    operations = [
        migrations.AddField(
            model_name="charactersettings",
            name="corp_jobs_notify_frequency",
            field=models.CharField(
                choices=[
                    ("disabled", "Disabled"),
                    ("immediate", "Immediate"),
                    ("daily", "Daily digest"),
                    ("weekly", "Weekly digest"),
                    ("monthly", "Monthly digest"),
                    ("custom", "Custom cadence"),
                ],
                default="disabled",
                max_length=20,
            ),
        ),
        migrations.AddField(
            model_name="charactersettings",
            name="corp_jobs_notify_custom_days",
            field=models.PositiveSmallIntegerField(default=3),
        ),
        migrations.AddField(
            model_name="charactersettings",
            name="corp_jobs_next_digest_at",
            field=models.DateTimeField(blank=True, null=True),
        ),
        migrations.AddField(
            model_name="charactersettings",
            name="corp_jobs_last_digest_at",
            field=models.DateTimeField(blank=True, null=True),
        ),
        migrations.AddField(
            model_name="jobnotificationdigestentry",
            name="scope",
            field=models.CharField(
                choices=[("personal", "Personal"), ("corporation", "Corporation")],
                default="personal",
                max_length=16,
            ),
        ),
        migrations.RemoveConstraint(
            model_name="jobnotificationdigestentry",
            name="job_digest_user_job_uq",
        ),
        migrations.AddConstraint(
            model_name="jobnotificationdigestentry",
            constraint=models.UniqueConstraint(
                fields=("user", "job_id", "scope"),
                name="job_digest_user_job_scope_uq",
            ),
        ),
    ]
