哎呀。
我使用mongoose,并意外地创建了一个集合“stats”。 直到几周之后我才意识到这将成为一个问题,所以我现在需要重命名(而不是仅删除)该集合......
但是,我的尝试遇到了一个可预测的问题:
PRIMARY> db.stats.find();
Thu Oct 18 10:39:43 TypeError: db.stats.find is not a function (shell):1
PRIMARY> db.stats.renameCollection('statssnapshots');
Thu Oct 18 10:39:45 TypeError: db.stats.renameCollection is not a function (shell):1