# Generated by Django 5.1.13 on 2026-01-09 09:27

from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('core', '0013_thread_is_trashed'),
    ]

    operations = [
        migrations.AddField(
            model_name='messagetemplate',
            name='is_default',
            field=models.BooleanField(default=False, help_text='Whether this template is the default; it will be automatically loaded when composing a new message', verbose_name='is default'),
        ),
        migrations.AddIndex(
            model_name='messagetemplate',
            index=models.Index(fields=['mailbox', 'type', 'is_default'], name='messages_me_mailbox_3bb022_idx'),
        ),
        migrations.AddIndex(
            model_name='messagetemplate',
            index=models.Index(fields=['maildomain', 'type', 'is_default'], name='messages_me_maildom_d8eb5d_idx'),
        ),
        migrations.AddConstraint(
            model_name='messagetemplate',
            constraint=models.UniqueConstraint(condition=models.Q(('is_default', True)), fields=('mailbox', 'type'), name='uniq_default_template_mailbox_type'),
        ),
        migrations.AddConstraint(
            model_name='messagetemplate',
            constraint=models.UniqueConstraint(condition=models.Q(('is_default', True)), fields=('maildomain', 'type'), name='uniq_default_template_maildomain_type'),
        ),
    ]
