# Generated by Django 4.2.24 on 2025-12-08 04:30

from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ("conversations", "0011_add_mentioned_agents_field"),
    ]

    operations = [
        migrations.RemoveConstraint(
            model_name="conversation",
            name="one_chat_field_null_constraint",
        ),
        migrations.AlterField(
            model_name="chatmessage",
            name="msg_type",
            field=models.CharField(
                choices=[("SYSTEM", "System"), ("HUMAN", "Human"), ("LLM", "LLM")],
                help_text="The type of message (SYSTEM, HUMAN, or LLM)",
                max_length=32,
            ),
        ),
        migrations.AddConstraint(
            model_name="conversation",
            constraint=models.CheckConstraint(
                check=models.Q(
                    ("conversation_type", "thread"),
                    ("chat_with_corpus__isnull", True),
                    ("chat_with_document__isnull", True),
                    _connector="OR",
                ),
                name="chat_type_mutual_exclusivity_constraint",
            ),
        ),
    ]
