Skip to content

Commit

Permalink
v0.6.5 revision
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminpkane committed Nov 12, 2020
1 parent 434cc0d commit 59dce12
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions fiftyone/migrations/revisions/v0_6_5.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
"""
FiftyOne v0.6.5 revision
| Copyright 2017-2020, Voxel51, Inc.
| `voxel51.com <https://voxel51.com/>`_
|
"""
import pymongo as pm


def up(db, dataset_name):
match_d = {"name": dataset_name}
dataset_dict = db.datasets.find_one(match_d)
sample_coll = db[dataset_dict["sample_collection_name"]]
sample_coll.update_many({}, {"$rename": {"media_type": "_media_type"}})


def down(db, dataset_name):
match_d = {"name": dataset_name}
dataset_dict = db.datasets.find_one(match_d)
sample_coll = db[dataset_dict["sample_collection_name"]]
sample_coll.update_many({}, {"$rename": {"_media_type": "media_type"}})

0 comments on commit 59dce12

Please sign in to comment.