mirror of
https://github.com/zulip/zulip.git
synced 2026-07-06 21:18:58 +08:00
migrations: Index MutedTopic on stream/topic.
This index lets us quickly find all users who may be muting a topic, which useful when we send messages out.
This commit is contained in:
parent
0263c857b3
commit
0164cfdf5c
21
zerver/migrations/0112_index_muted_topics.py
Normal file
21
zerver/migrations/0112_index_muted_topics.py
Normal file
@ -0,0 +1,21 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('zerver', '0111_botuserstatedata'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RunSQL(
|
||||
'''
|
||||
CREATE INDEX zerver_mutedtopic_stream_topic
|
||||
ON zerver_mutedtopic
|
||||
(stream_id, upper(topic_name))
|
||||
''',
|
||||
reverse_sql='DROP INDEX zerver_mutedtopic_stream_topic;'
|
||||
),
|
||||
]
|
||||
Loading…
Reference in New Issue
Block a user