Lucy Weatherford
Lucy Weatherford

Reputation: 5534

Rake db:migrate - how do I know if there is an unrun migration

I am working on an existing rails application, making changes and updating it.

How do I check if there are unrun rake db:migrate in it? Is there a direct command?

Upvotes: 4

Views: 983

Answers (2)

Teej
Teej

Reputation: 12873

Running this:

rake db:migrate:status

Would give you this:

   up     20130415141113  Rename coupon to discount coupon
   up     20130416144722  Create ratings
  down    20130419102623  Add published to product
  down    20130419124429  Add attachment photo to users

Anything that is 'down' has NOT been migrated.

Upvotes: 6

user946611
user946611

Reputation:

rake db:migrate:status

Will give you that information

Upvotes: 1

Related Questions