Skip to content

Commit

Permalink
perf: added index for email field in user model
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-lymar committed Jun 29, 2024
1 parent 70135c2 commit e0241ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion users/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def create_superuser(self, email, full_name, password=None, **extra_fields):

# Информация о пользователе приложения
class CustomUser(AbstractBaseUser, PermissionsMixin):
email = models.EmailField(max_length=50, unique=True, verbose_name="E-mail")
email = models.EmailField(max_length=50, unique=True, db_index=True, verbose_name="E-mail")
full_name = models.CharField(max_length=75, verbose_name="ФИО")
position = models.ForeignKey(
Position,
Expand Down

0 comments on commit e0241ca

Please sign in to comment.