diff --git a/fastapi_users_db_beanie/__init__.py b/fastapi_users_db_beanie/__init__.py index 6a73f7f..57ddaaa 100644 --- a/fastapi_users_db_beanie/__init__.py +++ b/fastapi_users_db_beanie/__init__.py @@ -23,9 +23,11 @@ class BeanieBaseUser(BaseModel): class Settings: email_collation = Collation("en", strength=2) indexes = [ - IndexModel("email", unique=True), IndexModel( - "email", name="case_insensitive_email_index", collation=email_collation + "email", + name="case_insensitive_unique_email_index", + collation=email_collation, + unique=True, ), ]