Skip to content

Instantly share code, notes, and snippets.

@gizipp
Created February 21, 2020 11:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gizipp/46d1c5b6761a4b737811d0e574c83529 to your computer and use it in GitHub Desktop.
Save gizipp/46d1c5b6761a4b737811d0e574c83529 to your computer and use it in GitHub Desktop.
[Rails] How to reset PG Database on Heroku?

How to reset PG Database on Heroku?

TL;DR

heroku restart && heroku pg:reset DATABASE && heroku run rake db:migrate

Steps

  • Step 1: heroku restart
  • Step 2: heroku pg:reset DATABASE (no need to change the DATABASE)
  • Step 3: heroku run rake db:migrate
  • Step 4: heroku run rake db:seed (if you have seed)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment