# Generated by Django 5.2.11 on 2026-03-06 20:42

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


class Migration(migrations.Migration):

    dependencies = [
        ('core', '0037_derivedtask_due_date_assignee_identifier'),
    ]

    operations = [
        migrations.CreateModel(
            name='UserXmppOmemoState',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('status', models.CharField(choices=[('pending', 'Pending'), ('detected', 'Detected'), ('no_omemo', 'No OMEMO'), ('error', 'Error')], default='pending', max_length=32)),
                ('latest_client_key', models.CharField(blank=True, default='', max_length=255)),
                ('last_sender_jid', models.CharField(blank=True, default='', max_length=255)),
                ('last_target_jid', models.CharField(blank=True, default='', max_length=255)),
                ('status_reason', models.TextField(blank=True, default='')),
                ('details', models.JSONField(blank=True, default=dict)),
                ('last_seen_at', models.DateTimeField(blank=True, null=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('user', models.OneToOneField(on_delete=models.deletion.CASCADE, related_name='xmpp_omemo_state', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'indexes': [models.Index(fields=['status', 'updated_at'], name='core_userxm_status_133ead_idx')],
            },
        ),
    ]
