[英]Ruby on Rails: How can I revert a migration with rake db:migrate?
[英]Rake db:migrate - how do I know if there is an unrun migration
我正在研究現有的rails應用程序,進行更改並進行更新。
如何檢查是否有unrun rake db:migrate in it? 有直接命令嗎?
運行這個:
rake db:migrate:status
會給你這個:
up 20130415141113 Rename coupon to discount coupon
up 20130416144722 Create ratings
down 20130419102623 Add published to product
down 20130419124429 Add attachment photo to users
任何“失敗”的東西都沒有遷移過。
rake db:migrate:status
會給你這些信息
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.