Rake db:migrate with relativeness

Hi people,

I found it a little hard to migrate up,down,redo with version numbers, i thought if we use

something relative to the last made migrations might make migrations usage better.

I liked the way i can revert or reset commits like git does “git reset HEAD~2”

same way we can also do “rake db:migrate:up ~1” ,which means migrate up the last commit.

Its easier to do and manage this rather than copying the version number from the file and pasting it.

I would like to do this, if i get a good response.



I think STEP parameter is what you’re looking for: http://guides.rubyonrails.org/migrations.html#rolling-back