Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

2.1 KB
Raw Blame
# Generated by Django 4.2.6 on 2023-10-19 06:37

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

from zerver.lib.migrate import add_index


class Migration(migrations.Migration):
    atomic = not settings.MIGRATIONS_ADD_REMOVE_INDEXES_CONCURRENTLY

    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,
            ),
        ),
        add_index(
            model_name="usermessage",
            index=models.Index(
                "user_profile",
                "message",
                condition=models.Q(("flags__andnz", 120)),
                name="zerver_usermessage_any_mentioned_message_id",
            ),
        ),
    ]