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.

1016 B
Raw Blame
# Generated by Django 5.2.16 on 2026-08-06 07:24

import django.db.models.functions.text
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", "0806_stream_default_push_notifications"),
    ]

    operations = [
        add_index(
            model_name="usertopic",
            index=models.Index(
                models.F("user_profile"),
                models.F("visibility_policy"),
                models.F("recipient"),
                django.db.models.functions.text.Upper("topic_name"),
                name="zerver_usertopic_user_visibility_recipient_idx",
            ),
        ),
        # The index is on an expression, whose statistics only exist once
        # the table has been analyzed.
        migrations.RunSQL("ANALYZE zerver_usertopic", reverse_sql=migrations.RunSQL.noop),
    ]