Don P
Don P

Reputation: 63728

Run all migrations from the beginning for a Heroku app

I want to run every migration for an app on Heroku (using postgres db). It is ok to drop the db and all existing data for the app.

Yes, this isn't how migrations are meant to be used. Long story, not relevant to the question or that interesting :)

Upvotes: 1

Views: 310

Answers (1)

Don P
Don P

Reputation: 63728

This is current as of November 2014. A lot of answers are outdated since the commands PG supports have changed.

$ heroku pg:reset DATABASE

Then you will be prompted to confirm by typing the name of your app.

$ heroku run rake db:migrate

Upvotes: 1

Related Questions