Useradm ensures the unique index on email on user creation:
The problem is that the old mongodb driver used "uniqueEmail" as index name, while the new driver uses email_1. This mismatch makes it impossible to create users in old tenants. One of our customers hit this issue in production. Tenants created after the 16th of March, 2020 have the email_1. Creating users on tenants older than that date fails, as of today.
- Remove the EnsureIndexes
- Create a migration which drops the unique index on email, and recreates it with a deterministic name