Rails Database Migration Status
Wondering if you've run the latest database migration? Wonder no more. There are better ways to find out this information than blindly running the migrations or waiting for your app to crash.
A handy command built into Rails is rake db:migrate:status
. Here's some sample output from my blog's development PostgreSQL database:
% rake db:migrate:status
database: worth-chicago_co_development
Status Migration ID Migration Name
--------------------------------------------------
up 20150422174456 Create developers
up 20150422174509 Create authem sessions
up 20150422200749 Create posts
up 20150423152139 Add url slugs to posts
up 20150628171109 Add constraints to posts and developers
Knowledge is power!
Tweet