# Generated by Django 5.2.9 on 2026-01-14 09:21

import uuid
from django.db import migrations, models
import uuid

def migrate_uuid(apps, schema_editor):
    MassMail = apps.get_model("wbmailing", "MassMail")
    objs = []
    for obj in MassMail.objects.all():
        obj.uuid = uuid.uuid4()
        objs.append(obj)
    MassMail.objects.bulk_update(objs, ["uuid"])

class Migration(migrations.Migration):

    dependencies = [
        ('wbmailing', '0004_alter_mailinglistemailcontactthroughmodel_unique_together_and_more'),
    ]

    operations = [
        migrations.AddField(
            model_name='mailtemplate',
            name='include_webview_link',
            field=models.BooleanField(default=False),
        ),
        migrations.AddField(
            model_name='massmail',
            name='uuid',
            field=models.UUIDField(default=None, blank=True, null=True),
        ),
        migrations.RunPython(migrate_uuid),
        migrations.AlterField(
            model_name='massmail',
            name='uuid',
            field=models.UUIDField(default=uuid.uuid4, editable=False, unique=True),
        ),
    ]
