Files
zulip/zerver/migrations/0457_backfill_scheduledmessagenotificationemail_trigger.py
Prakhar Pratyush 179d5cb37d mention: Replace 'wildcards' with 'stream_wildcards'.
This prep commit replaces the 'wildcard' keyword in the codebase
with 'stream_wildcard' at some places for better readability, as
we plan to introduce 'topic_wildcards' as a part of the
'@topic mention' project.

Currently, 'wildcards = ["all", "everyone", "stream"]' which is an
alias to mention everyone in the stream, hence better renamed as
'stream_wildcards'.

Eventually, we will have:
'stream_wildcard' as an alias to mention everyone in the stream.
'topic_wildcard' as an alias to mention everyone in the topic.
'wildcard' refers to 'stream_wildcard' and 'topic_wildcard' as a whole.
2023-07-03 22:03:17 -07:00

37 lines
1.2 KiB
Python

# Generated by Django 4.2.1 on 2023-06-20 12:07
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("zerver", "0456_alter_usergroup_can_mention_group"),
]
operations = [
migrations.RunSQL(
"""
UPDATE zerver_scheduledmessagenotificationemail
SET trigger = 'stream_wildcard_mentioned'
WHERE trigger = 'wildcard_mentioned';
""",
reverse_sql="""
UPDATE zerver_scheduledmessagenotificationemail
SET trigger = 'wildcard_mentioned'
WHERE trigger = 'stream_wildcard_mentioned';
""",
),
migrations.RunSQL(
"""
UPDATE zerver_scheduledmessagenotificationemail
SET trigger = 'stream_wildcard_mentioned_in_followed_topic'
WHERE trigger = 'followed_topic_wildcard_mentioned';
""",
reverse_sql="""
UPDATE zerver_scheduledmessagenotificationemail
SET trigger = 'followed_topic_wildcard_mentioned'
WHERE trigger = 'stream_wildcard_mentioned_in_followed_topic';
""",
),
]