Created
December 29, 2015 19:13
-
-
Save mpobrien/f238887efbc8d7a09207 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function migrateBaselines(from_project, to_project){ | |
var migration_id = new ObjectId() | |
print("using migration id", migration_id) | |
var baselines = db.json.find({project_id:from_project,tag:{$exists:true, $ne:""}}) | |
while(baselines.hasNext()){ | |
var n = baselines.next() | |
delete n._id | |
n.project_id = to_project | |
n.from_migration_id = migration_id | |
db.json.insert(n) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment