So I'm trying to tidy up my database.
I logged into shell, made a show collections request and then I wanted to delete some of those.
I used db.collection_name.drop() and it helped for a while. A dozen of collections were deleted successfully.
But then I got to a collection called "stats".
db.stats.drop() brings error E QUERY [js] TypeError: db.stats.drop is not a function : @(shell):1:1
The only difference with previous successful drops is the collection name. So I'm guessing maybe it's a reserved word or something? How do I drop it? I thought shell is the best way to do such things.
db.getCollection("stats").drop() did the job
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With