mirror of
https://github.com/zulip/zulip.git
synced 2025-11-10 17:07:07 +00:00
models: Add new UserMessage flag active_mobile_push_notification.
This flag is used to track which user/message pairs correspond to an active mobile push notification, that should potentially be cleared when the user reads the message. This flag should never appear on a message that is also marked as read; eventually we may want a cron job to check for that condition. We include a partial index on UserMessage for this flag.
This commit is contained in:
@@ -96,6 +96,14 @@ def create_indexes() -> None:
|
||||
where_clause='WHERE (flags & 2048) != 0',
|
||||
)
|
||||
|
||||
# copied from 0180
|
||||
create_index_if_not_exist(
|
||||
index_name='zerver_usermessage_active_mobile_push_notification_id',
|
||||
table_name='zerver_usermessage',
|
||||
column_string='user_profile_id, message_id',
|
||||
where_clause='WHERE (flags & 4096) != 0',
|
||||
)
|
||||
|
||||
class Command(ZulipBaseCommand):
|
||||
help = """Create concurrent indexes for large tables."""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user