Skip to content

Instantly share code, notes, and snippets.

@heymichaelp
Created March 19, 2014 14:29
Show Gist options
  • Select an option

  • Save heymichaelp/9642769 to your computer and use it in GitHub Desktop.

Select an option

Save heymichaelp/9642769 to your computer and use it in GitHub Desktop.
var collectionsToEmpty = [ 'bidOMatics', 'bidTransactions', 'bids', 'invoices', 'users' ];
for(var i = 0; i < collectionsToEmpty.length; i++)
db[collectionsToEmpty[i]].remove({});
if(db.paypal_tx)
db.paypal_tx.drop();
db.auctions.update({},
{
$set: { currentPrice: 0.0 },
$unset: { 'lastBid': 1, 'winningUserId': 1 }
},
{ multi: true });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment