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.

1020 B
Raw Blame
# Generated by Django 2.2.12 on 2020-04-30 00:35

from django.conf import settings
from django.db import migrations, models
from django.db.models import F
from django.db.models.functions import Upper

from zerver.lib.migrate import add_index


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

    dependencies = [
        ("zerver", "0278_remove_userprofile_alert_words"),
    ]

    operations = [
        add_index(
            model_name="message",
            index=models.Index(
                "recipient",
                Upper("subject"),
                F("id").desc(nulls_last=True),
                name="zerver_message_recipient_upper_subject",
            ),
        ),
        add_index(
            model_name="message",
            index=models.Index(
                "recipient",
                "subject",
                F("id").desc(nulls_last=True),
                name="zerver_message_recipient_subject",
            ),
        ),
    ]