-
-
Save fedejimenez/46ea25890fb15869a0dca01f9cf3189f to your computer and use it in GitHub Desktop.
Revisions
-
zulhfreelancer revised this gist
Jan 1, 2017 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,6 +5,10 @@ - Step 3: `heroku run rake db:migrate` - Step 4: `heroku run rake db:seed` (if you have seed) **One liner** `heroku restart; heroku pg:reset DATABASE --confirm APP-NAME; heroku run rake db:migrate` **Note 1** Heroku doesn't allow users from using `rake db:reset`, `rake db:drop` and `rake db:create` command. They only allow `heroku pg:reset` and `rake db:migrate` commands. -
zulhfreelancer revised this gist
Mar 9, 2016 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ ### How to reset PG Database on Heroku? - 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) -
zulhfreelancer created this gist
Mar 9, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ ### How to reset PG Database on Heroku? - 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) **Note 1** Heroku doesn't allow users from using `rake db:reset`, `rake db:drop` and `rake db:create` command. They only allow `heroku pg:reset` and `rake db:migrate` commands. More info: https://devcenter.heroku.com/articles/rake **Note 2** If you have more than 1 remote, append `--remote [your_remote_name]` like this: `heroku run rake db:migrate --remote dev` (`dev` is example remote here)