Abort if pending migrations with data
We use the awesome gem data-migrate with comes with a handy rake task to check if you have migrations pending. The task is really and extention to the task built in on rails but that also check for pending data migrations.
That rake task is available since version 6.3.0 of data-migrate. If you are stuck in an older version like I was here is a version of the rake task you can put in your project.