[英]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. 我正在研究现有的rails应用程序,进行更改并进行更新。
How do I check if there are unrun rake db:migrate in it? 如何检查是否有unrun rake db:migrate in it? Is there a direct command? 有直接命令吗?
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. 任何“失败”的东西都没有迁移过。
rake db:migrate:status
会给你这些信息
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.