mirror of
https://github.com/clearml/clearml-server
synced 2025-02-12 07:38:28 +00:00
Add migration: remove outdated user email index from db
This commit is contained in:
parent
641ed1b510
commit
e6c0f1b6d8
12
apiserver/mongo/migrations/0.17.3.py
Normal file
12
apiserver/mongo/migrations/0.17.3.py
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
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()
|
Loading…
Reference in New Issue
Block a user