mirror of https://github.com/zulip/zulip.git
Add case-insensitive index on UserProfile.email.
This fixes a performance issue looking up UserProfile objects for realms with a large number of users in the case that a UserProfile object is not in the cache. Thanks to @dbiollo for the suggestion!
This commit is contained in:
parent
a98b0cf35d
commit
ebcb569c96
|
@ -0,0 +1,16 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import models, migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('zerver', '0005_auto_20150920_1340'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RunSQL("CREATE INDEX upper_userprofile_email_idx ON zerver_userprofile ((upper(email)));",
|
||||
reverse_sql="DROP INDEX upper_userprofile_email_idx;"),
|
||||
]
|
Loading…
Reference in New Issue