Skip to content

Instantly share code, notes, and snippets.

@jmervine
Created June 6, 2012 04:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jmervine/2879955 to your computer and use it in GitHub Desktop.
Save jmervine/2879955 to your computer and use it in GitHub Desktop.
update _type
var post_count = function() {
db.posts.find( { "_type" : /^Ditty/ } );
}
var update_posts = function() {
db.posts.update( { "_type" : "Ditty::Post" }, { $set : { "_type" : "Post" } }, true, true);
}
var tag_count = function() {
db.tags.find( { "_type" : /^Ditty/ } );
}
var update_tags = function() {
db.tags.update( { "_type" : "Ditty::Tag" }, { $set : { "_type" : "Tag" } }, true, true);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment