Q:

Mongodb + Mongoose.js - easy way to check that records conform to schema?

I have a mongodb DB which over time has been populated with data using various mongoose schema versions.  I would like to run through these collections and verify that each document still conforms to the current mongoose schema.
What's the best way of going about this with Mongoose?

A:

Document.validate can be a good start.
After if you use mongoose in strict mode, it's really a bad idea to didn't transform documents when you change your schema

