LoginSignup
12

More than 5 years have passed since last update.

herokuのデータベースをリセットした際の留意点

Posted at

herokuのデータベースをリセット

heroku pg:reset DATABASE

上記コマンドにて、heroku上のデータベースをリセットできるが、このままの状態でherokuのアプリを開くと

We're sorry, but something went wrong.
If you are the application owner check the logs for more information.

となり、アプリを開いてもエラーが帰って来る。

解決策

heroku run rake db:migrate

確かにrailsでもデータベースを弄った後は更新していたので自然な流れのようにも感じる。
上記コードを叩くことで無事にサイトが表示されるようになります。

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
12