SHARE
TWEET

Untitled

a guest May 23rd, 2019 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. db.getCollection("data-sources").find({}).forEach(function(doc) {
  2.    db.getCollection("data-sources").update(
  3.      { key: doc.key },
  4.      { $set: { "data.$[]._meta" : {createdVersionId: doc.versionInfo._id, editedVersionId: doc.versionInfo._id } } }
  5.    );
  6. });
  7.  
  8. db.getCollection("data-source-versions").find({}).forEach(function(doc) {
  9.    db.getCollection("data-source-versions").update(
  10.      { key: doc.key },
  11.      { $set: { "data.$[]._meta" : {createdVersionId: doc._id, editedVersionId: doc._id } } }
  12.    );
  13. });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top