Heroku run rake db:migrate results in no change in the database, app restarted several times

前端 未结 4 675
不思量自难忘°
不思量自难忘° 2020-12-14 09:37

I have a problem with pushing my migrations to the production database.

The issue:

  1. I\'ve altered database schema by adding 1 column.
  2. I\'ve

4条回答
  •  没有蜡笔的小新
    2020-12-14 10:07

    I just had same problem. After adding a column to my DB locally, I did heroku run rake db:migrate -app [my app name]. Running my code on production, I got ActiveRecord::UnknownAttributeError (unknown attribute '_____' for [table name].)

    This solved my problem:

    heroku restart --app [my app name]

提交回复
热议问题