Created
September 9, 2020 14:33
-
-
Save aniruddha27/781fd3f2cb3dd732d264861e1cf669e5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# drop previous indexes | |
db.neighborhoods.drop_indexes() | |
# Create unique index | |
db.neighborhoods.create_index('name', | |
name='neighborhood', | |
unique=True) | |
# Indexes | |
pprint(db.neighborhoods.index_information()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment