Delete and Redeploy Rails app to heroku

前端 未结 2 709
温柔的废话
温柔的废话 2021-01-29 23:27

I have a rails app that is deployed to Heroku. I recently made a ton of changes, deleted old migrations, recreated new migrations, rebased and dealt with merge conflicts....the

2条回答
  •  难免孤独
    2021-01-30 00:23

    If you don't want to delete the entire application (perhaps you want to keep your add-ons and other configuration the same), you can reset the database and force update the code.

    Deploy your new code, forcing the update by using the -f flag:

    git push heroku master -f
    

    Drop and recreate the database:

    heroku pg:reset 
    

    Migrate the fresh database:

    heroku run rake db:migrate
    

提交回复
热议问题