clearml-server/apiserver/mongo/migrations/0.17.3.py

13 lines
314 B
Python

from collections import Collection
from pymongo.database import Database, Collection
def migrate_auth(db: Database):
"""
Remove the old indices from the user collections
to enable building of the updated user email index
"""
collection: Collection = db["user"]
collection.drop_indexes()