2

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.

Dmitriy M
  • 297
  • 1
  • 2
  • 7

1 Answers1

1

db.getCollection("stats").drop() did the job

Dmitriy M
  • 297
  • 1
  • 2
  • 7