I seem to have corrupted the database on a test application on Heroku
using db:push.

Is it the case that before running db:push or db:pull, one must always
clear the target database, whether on the Heroku or local side?
Whenever I don't do so before calling db:pull, it errors out due to
duplicate entries in the database.

On my test application, I cleared out the database using db:migrate
VERSION=0 and then db:migrate. I then began to push up a copy of my
local database, in order to see whether it would push up tables in the
database that are not used by my application. It was pushing those up,
so I hit Ctrl-C to cancel.

I'm not really sure why, but now it thinks it's on version 0 of the
database, even while it already has all of the tables from the full
migration set. This leaves me unable to perform another db:migrate
VERSION=0, and attempts to do so error out as it tries to create my
first migration for some reason.

I'm unable to perform either db:migrate:reset or db:reset because I do
not have drop permission on the database.

What procedure should I follow to clear out the database? Also, is
this type of corruption always going to happen if a db:push is
canceled part way through?

-- 
You received this message because you are subscribed to the Google Groups 
"Heroku" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/heroku?hl=en.

Reply via email to