On the terminal, is there a rake task to list all the migrations which have been run on a particular model? If not, how do I go about building one?
When I ran rake -T
, rake db:migrate:status
seemed to be the right answer, but it gave me Migration Name as one of the columns. And though the name Add logo to company
does indicate Company model, not all migrations have such explicit names. Case in point being Change data type for content
. I have 400 odd migration files, so this feature would be really helpful.
So, the ideal output would be:
database: abcd_development
Status Migration ID Migration Name Model Name
----------------------------------------------------------
Thanks!