ActiveRecord Migration Peev- Freedom to run app while migrations are pending

I was wondering if there should be a way to run the app even if some migrations are pending. Lets say I have created a migration…but at this time I am not sure if I want to run it as is …am anticipating modifications. What if in the error page “Migrations are pending. To resolve this issue, run: bin/rake db:migrate RAILS_ENV=development” there is a mention of a way to override the error and run the app as is…or does it already exist. Then one doesn’t need to run the migration and later new ones to modify it…

As a very short term thing you could of course just remove the corresponding migration file. If you want to disable the check altogether then you could remove the ActiveRecord::Migration::CheckPending middleware. See for details on how to remove middlewares from your app.


If you have already committed the migration to your source control
system then just rollback to the previous version. If you have not
committed it but are using git then git stash will save it temporarily
in the stash so you can recover it later. If you are not using a
source control system then start now. It is almost trivial to setup
git and after you start using it you will wonder how you survived