Last Updated: February 25, 2016
·
4.792K
· rshetty

Check Pending Migrations in Rails 4

Rails 4 has added a brand new method which checks for pending migrations in your application.

ActiveRecord::Migration.check_pending!

The above method raises an error, if there are pending migrations in your application.

returns 'nil' if there are no migrations to be run.

Happy hacking!!!