Every time I have to run/redo a particular migration in my rails app, I have to go through the following steps to obtain the exact version number:
- grep - Search the files in the db/migrate folder containing the model/table name that I need, or
- locate - Similar to grep, I search for files containing the model/table name and pipe this with a grep to filter out db/migrate results, or
- ls - Use ls db/migrate/2xxx and keep using auto-complete until I narrow down the exact migration I am looking for
I want to know if there is an easier way of doing this. That is, a plugin that might suggest version numbers when I begin entering rake db:migrate:redo VERSION=
Is there any bash/rails plugin that would do this?