mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
0f09dfca36
* Guard against using VERSION with db:rollback
I recently ran a migration that I needed to rollback, and admittedly, I often forget the proper incantation for this 😅
so the first thing I tried was to run `bin/rake db:rollback VERSION=123454679`. I had hoped that this reverted my
migration back and at first glance I thought it worked. However on closer inspection I realized that it was a different
migration, which initially confused me.
So I looked over the docs and saw that I was using the rake task incorrectly, and promptly corrected my mistake.
Proposal
Looking at the how the `:down` task is defined we see
|
||
---|---|---|
.. | ||
dbs_test.rb | ||
framework_test.rb | ||
log_test.rb | ||
migrations_test.rb | ||
multi_dbs_test.rb | ||
restart_test.rb | ||
tmp_test.rb |