There is no method for dropping a collection from mongoose, the best you can do is remove the content of one :
Model.remove({}, function(err) {
console.log('collection removed')
});
But there is a way to access the mongodb native javascript driver, which can be used for this
mongoose.connection.collections['collectionName'].drop( function(err) {
console.log('collection dropped');
});
Warning
Make a backup before trying this in case anything goes wrong!
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…