I have a rails app deployed on heroku with postgres db.
My goal is to get a copy of the db to my local machine. So, I followed the 3-liner instruction: https://devcenter.heroku.com/articles/heroku-postgres-import-export#export
There were errors in my localhost app, and I traced the problem to be that pg_restore
didnt fill one of the tables, while rest of the table is filled
Question is:
- how is this possible?
- what are the things I can check to debug how this happened?
EDIT:
looks like this is behaving nicely (and solves my problem):
rake db:drop db:create
then pg_restore db.dump
but this is not: rake db:drop db:create db:migrate
then pg_restore db.dump