node node_modules/mongo-migrate -cfg config/custom/mongodb.json -dbn development-migrate -runmm down 5
If there is an exception throwed during the down(), we got the exception (and nothing else, not the line where the exception was generated, bad too) but it looks like the rollback was executed because I can't rollback again! I mean, if there is an exception, everything done during the down function should be rollback to the previous state automatically. And the migration SHOULD NOT be considered done!
Maybe I'm wrong but it looks like that right now, because I need to run the up() function to use the down() function again. Pretty bad, hopefully I'm just doing test and the data are absolutely useless so it's not a problem, yet.
I'm new in mongoDb, mongo-migrate and so on.
There is something I don't like, when I run
If there is an exception throwed during the down(), we got the exception (and nothing else, not the line where the exception was generated, bad too) but it looks like the rollback was executed because I can't rollback again! I mean, if there is an exception, everything done during the down function should be rollback to the previous state automatically. And the migration SHOULD NOT be considered done!
Maybe I'm wrong but it looks like that right now, because I need to run the up() function to use the down() function again. Pretty bad, hopefully I'm just doing test and the data are absolutely useless so it's not a problem, yet.