Reputation: 3
How can we remove a collection registered using keystone register method?
I tried to remove the model without success, then I tried manually using node console: But now even if I remove the collection using:
mongoose.connection.db.dropCollection('news', function(err, result) {console.log(err)});
my collection is automatically recreated somehow by keystonejs.
Any help would be appreciated.
Upvotes: 0
Views: 333
Reputation: 11603
If you want to remove a model remove model.js from the models directory. And wipe your db manually.
Upvotes: 1