Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- db.getCollection("data-sources").find({}).forEach(function(doc) {
- db.getCollection("data-sources").update(
- { key: doc.key },
- { $set: { "data.$[]._meta" : {createdVersionId: doc.versionInfo._id, editedVersionId: doc.versionInfo._id } } }
- );
- });
- db.getCollection("data-source-versions").find({}).forEach(function(doc) {
- db.getCollection("data-source-versions").update(
- { key: doc.key },
- { $set: { "data.$[]._meta" : {createdVersionId: doc._id, editedVersionId: doc._id } } }
- );
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement