Closed jbculbertson closed 7 years ago
db:nuke_pave
is an alias for several commands: bin/rake db:drop db:create db:migrate db:seed db:examples
. You'll need to follow a similar procedure on Heroku so that the seeded data doesn't conflict with data that's already there.
thanks Caleb - I started down that road, with heroku run rake db:drop, but get this error:
If you are sure you want to continue, run the same command with the environment variable: DISABLE_DATABASE_ENVIRONMENT_CHECK=1
I think it's just asking you to make your intent very clear, since dropping a production database is usually not a thing you want to do. Are you able to do heroku run rake db:drop DISABLE_DATABASE_ENVIRONMENT_CHECK=1
?
Also take a look at using heroku pg:reset
https://devcenter.heroku.com/articles/rake#limitations
Nice, that worked. Thanks Mike and Caleb!
Hi - I have a rake file to seed my development site. i've used it many times and it works on the dev side, but I just tried it on my production side and it didn't work.
My steps on development: bin/rake db:nuke_pave bin/rake db:seed
Attempt on production: heroku run rake db: migrate heroku run rake db:seed - this paused because the user seed I created already exists. It seemed to update the recipes I seeded, but they don't attach to the user properly.
I don't see any issues that have the same problem - could someone help point me in the right direction?