Skip to content
This repository has been archived by the owner on Dec 2, 2024. It is now read-only.

Commit

Permalink
add usersv0 indexes for emails
Browse files Browse the repository at this point in the history
  • Loading branch information
tnix100 committed Sep 9, 2024
1 parent 2f8ebca commit d316337
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions database.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@
# Create usersv0 indexes
try: db.usersv0.create_index([("lower_username", pymongo.ASCENDING)], name="lower_username", unique=True)
except: pass
try: db.usersv0.create_index([("email", pymongo.ASCENDING)], name="email", unique=True)
except: pass
try: db.usersv0.create_index([("normalized_email_hash", pymongo.ASCENDING)], name="normalized_email_hash", unique=True)
except: pass
try: db.usersv0.create_index([("created", pymongo.DESCENDING)], name="recent_users")
except: pass
try:
Expand Down

0 comments on commit d316337

Please sign in to comment.