-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Upper index for email in EmailAddress model #3382
Conversation
This PR fixes #3129 |
allauth/account/models.py
Outdated
@@ -41,6 +43,7 @@ class Meta: | |||
condition=Q(verified=True), | |||
) | |||
] | |||
indexes = [Index(Upper("email"), name="idx_upper_email")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The other indexes are named like this:
Indexes:
"account_emailaddress_pkey" PRIMARY KEY, btree (id)
Could you rename this one to account_emailaddress_upper_email
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have renamed the index and manually renamed in migration file, i hope that's the correct way instead of deleting and regenerating the migration file.
One final thing, can you make sure the code is black formatted? The build is failing on that now. Thanks. |
98951b4
to
0b8556d
Compare
I did the black formatting, sorry for the inconvenience. |
applied isort as suggested by tests |
This PR add index for email field in EmailAddress Model, this is to improve email__iexact filter in function filter_users_by_email