mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 23:13:25 +00:00
confirmation: Add an index on content_type, object_id.
This makes lookups of `.confirmation`, or joins through
`confirmation__` as we do in the `/json/invites`, actually fast. See
https://code.djangoproject.com/ticket/23435
(cherry picked from commit fcb04598f0)
This commit is contained in:
committed by
Tim Abbott
parent
aabab08eba
commit
e3d1ff1cc2
@@ -231,6 +231,9 @@ class Confirmation(models.Model):
|
||||
|
||||
class Meta:
|
||||
unique_together = ("type", "confirmation_key")
|
||||
indexes = [
|
||||
models.Index(fields=["content_type", "object_id"]),
|
||||
]
|
||||
|
||||
@override
|
||||
def __str__(self) -> str:
|
||||
|
||||
Reference in New Issue
Block a user