I added new validation to my model. Now, when I run my migrations on old database dump, I have error in the middle with save()!
method with description: Validation failed: User can't be blank
.
How can I avoid this problem? The only way is to edit this migration to work with database dumps now?
Solution found to be simple, just don't use
.save
method on model, it validates all fields. Instead, use.update
.