6
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

herokuでdb:migrateしたのにunknown attributeが発生

Posted at

heroku run rails db:migrateは正常に済んでいるように見えるのだけれども、
Railsアプリからデータを登録しようとするとWe're sorry, but something went wrong.のエラー画面に。

herokuのログ([more]からView logs)で確認したら、追加したはずのカラムがunknown attributeになっている。

結果

今回はheroku restart --app <アプリケーション名>で解決。

これまではrestart無しでもカラム追加を反映できていたのです。
何が違うとこうなるんでしょうか?(そこまで調べ切れていません...)

6
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?