# Generated by Django 4.2.6 on 2023-10-19 06:37

import bitfield.models
from django.contrib.postgres.operations import AddIndexConcurrently
from django.db import migrations, models


class Migration(migrations.Migration):
    atomic = False

    dependencies = [
        ("zerver", "0484_preregistrationrealm_default_language"),
    ]

    operations = [
        migrations.AlterField(
            model_name="archivedusermessage",
            name="flags",
            field=bitfield.models.BitField(
                [
                    "read",
                    "starred",
                    "collapsed",
                    "mentioned",
                    "stream_wildcard_mentioned",
                    "topic_wildcard_mentioned",
                    "group_mentioned",
                    "force_expand",
                    "force_collapse",
                    "has_alert_word",
                    "historical",
                    "is_private",
                    "active_mobile_push_notification",
                ],
                default=0,
            ),
        ),
        migrations.AlterField(
            model_name="usermessage",
            name="flags",
            field=bitfield.models.BitField(
                [
                    "read",
                    "starred",
                    "collapsed",
                    "mentioned",
                    "stream_wildcard_mentioned",
                    "topic_wildcard_mentioned",
                    "group_mentioned",
                    "force_expand",
                    "force_collapse",
                    "has_alert_word",
                    "historical",
                    "is_private",
                    "active_mobile_push_notification",
                ],
                default=0,
            ),
        ),
        AddIndexConcurrently(
            model_name="usermessage",
            index=models.Index(
                "user_profile",
                "message",
                condition=models.Q(("flags__andnz", 120)),
                name="zerver_usermessage_any_mentioned_message_id",
            ),
        ),
    ]
