pymongo创建索引
from database import db
db_list = ["table1", "table2", "table3", "table4"]
for item in db_list:
collection = db[item]
collection.create_index([("phone", 1)])
print(list(collection.index_information()))
from database import db
db_list = ["table1", "table2", "table3", "table4"]
for item in db_list:
collection = db[item]
collection.create_index([("phone", 1)])
print(list(collection.index_information()))