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()))

相关文章:

  • 2021-10-14
  • 2021-11-06
  • 2022-12-23
  • 2021-11-06
  • 2021-11-06
  • 2021-09-02
  • 2021-11-29
  • 2021-11-03
猜你喜欢
  • 2022-12-23
  • 2022-01-26
  • 2022-12-23
  • 2022-12-23
  • 2021-10-12
  • 2022-12-23
  • 2021-05-24
相关资源
相似解决方案