Thyago B. Rodrigues
Thyago B. Rodrigues

Reputation: 630

rake db:migrate conflicting with pre-loaded data on Heroku PostgreSQL

I have an app on Heroku running on Postgres. The problem is: I needed to load some data on one of the tables, and I managed to do it using Heroku's pg:push command. The problem is that it only works after a pg:reset, which resets the database and pre-loads it's initial state, then I have to pre-load the data and then I must run the migrations. But the migrations won't work on this specific table, since it's already loaded with data.

So this is the situation I find myself in: my migrations fail because of this pre-loading, so I had to remove them - but I don't want to deal with these missing migrations everytime I must run them.

The question would be: is there any way to load data on Heroku's Postgres after the migrations have been executed?

Thanks!

Upvotes: 0

Views: 186

Answers (1)

Dheer
Dheer

Reputation: 793

Try this command:

heroku run rake db:migrate

Upvotes: 1

Related Questions