What is best practice on model changes?
neilyoung opened this issue · 3 comments
As subject says. My node test app is firing tons of warnings like this:
{ name: 'Nohm Error',
message: 'WARNING: A hash in the DB contained a key (age) that is not in the model definition. This might be because of model changes or database corruption/intrusion.' }
Is there a way to declare model properties as deprecated?
No, there is currently no automated way to do this.
Since there are no schemas in the database, there is no way for the code to know if the code is wrong or the db.
The best way to deal with this currently is to write a small script that simply iterates over the hashes and removes the outdated values. Of course you should be very careful when doing this with live data.
I see. Thanks for the follow up
No problem, let me know if you need any further help.