当我运行heroku运行rake db:migrate:status
我最后四次迁移就像这样
up 20150916190326 Add fields to purchase
up 20150923012744 Create friendly id slugs
up 20150923013732 Add weight to product
up 20150926012254 Add stste to purchase
up 20150930015516 Add shipping rate to purchase
down 20150930025547 Add country to purchase
down 20150930025742 Add country again to purchase
down 20150930031326 Add countryy to purchase
down 20150930042706 Add countryyy to purchase
我应该运行什么来使它们全部完成而不删除heroku中的数据库?
答案 0 :(得分:4)
步骤1)使用以下命令检查已关闭的迁移的版本号。
heroku run rake db:migrate:status
步骤2)下面的命令将使用相应的版本号迁移表。
heroku run rake db:migrate:up VERSION= 20150930025547