I've recently started to experiment with Sequelize Migrations using sequelize-cli. I noticed that if the migration script throws an error (using a try-catch block), sequelize-cli still updates the SequelizeMeta table with the migration as if it was successful.
What is the best way to catch errors and prevent Sequelize from entering the migration into the SequelizeMeta table on 'up', and conversely, prevent removing the migration when the 'down' script fails?