mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
The full auditlog table is moderately large, and the previously-chosen index (on `modified_user_id`) is not terribly specific.
27 lines
808 B
Python
27 lines
808 B
Python
# Generated by Django 4.2 on 2023-04-28 19:06
|
|
|
|
from django.db import migrations, models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
dependencies = [
|
|
("zerver", "0445_drop_userpresenceold"),
|
|
]
|
|
|
|
operations = [
|
|
migrations.AddIndex(
|
|
model_name="realmauditlog",
|
|
index=models.Index(
|
|
name="zerver_realmauditlog_user_subscriptions_idx",
|
|
fields=["modified_user", "modified_stream"],
|
|
condition=models.Q(
|
|
event_type__in=[
|
|
301, # RealmAuditLog.SUBSCRIPTION_CREATED
|
|
302, # RealmAuditLog.SUBSCRIPTION_ACTIVATED
|
|
303, # RealmAuditLog.SUBSCRIPTION_DEACTIVATED
|
|
]
|
|
),
|
|
),
|
|
),
|
|
]
|