I have a MongoDb schema like this
var User = new Schema({
\"UserName\": { type: String, required: true },
\"Email\": { type: String, required: tr
What I had realized is that my data-structures were changing -- this is where versioning
comes in handy.
You may need to get a mongoose-version
module, do a thing.remove({}, ...)
or even drop the collection: drop database with mongoose
I use RoboMongo for an admin tool (and I highly recommend it!) so I just went in and right-clicked/dropped collection from the console.
If anyone knows how to easily version and/or drop a collection from within the code, feel free to post a comment below as it surely helps this thread ( and I :) ).