# Generated by Django 5.2 on 2025-09-16 18:38

from django.db import migrations, models


def set_sent_expiration_email_true(apps, schema_editor):
    PersistentAgent = apps.get_model('api', 'PersistentAgent')
    PersistentAgent.objects.update(sent_expiration_email=True)


def reset_sent_expiration_email(apps, schema_editor):
    PersistentAgent = apps.get_model('api', 'PersistentAgent')
    PersistentAgent.objects.update(sent_expiration_email=False)


class Migration(migrations.Migration):

    dependencies = [
        ('api', '0129_remove_browserllmtier_uniq_browser_tier_order_per_policy_and_more'),
    ]

    operations = [
        migrations.AddField(
            model_name='persistentagent',
            name='sent_expiration_email',
            field=models.BooleanField(default=False, help_text='Whether a soft-expiration notification has been sent for the current inactivity period.'),
        ),
        migrations.RunPython(set_sent_expiration_email_true, reset_sent_expiration_email),
    ]
