-1

I'm using the taps gem, and I am trying to use heroku db:pull to pull down my current production database.

However, when I pull, it pulls down a database that I db:push'd almost 3 months ago, instead of the current DB.

Is there a way to specify that I want the latest? Is it possible to remove that old database?

Thanks for your time

EDIT: I'm using MySQL locally, and I am aware of pgbackups and am trying to avoid the pg dumping associated with that.

rpearce
  • 1,720
  • 1
  • 21
  • 29

2 Answers2

1

If you have multiple deployment environments (ie staging vs production), make sure you specify the right one with db:pull --app productionAppName.

If you have unused tables in the production environment that you want to get rid of, your two options are:

  1. create a migration to drop the table
  2. "heroku run rails console" and manually drop the tables.

both techniques are described in this post: Heroku Drop Table Rails Help

hope it helps!

Community
  • 1
  • 1
ryan0
  • 1,482
  • 16
  • 21
0

There was only 1 DB on Heroku, but it had remnant tables from a long time ago that were not overwritten when I pushed the new database up.

TL;DR => it merged the old DB with the new

rpearce
  • 1,720
  • 1
  • 21
  • 29
  • i had that same issue. i've edited my original answer and included the link i used to resolve it. do not go the manual route unless your db migrations are messed up. – ryan0 Sep 08 '12 at 20:48