yamldb / yaml_db

Rails plugin for a database-independent dump format, data.yml .......... Seeking new maintainers! See https://github.com/yamldb/yaml_db/issues/143
https://rubygems.org/gems/yaml_db
949 stars 200 forks source link

bubble pg errors? #93

Closed mjhoy closed 1 year ago

mjhoy commented 8 years ago

Hi!

I was using yaml_db for an old project recently, one that I had to set up again on my development machine, and my intention was to pull down data from the current production site. Well, due to a silly oversight on my part, I was had not actually checked out the version running in production, and a migration was not present. Trying to run rake db:data:load on my production data resulted in a rather mysterious error:

$ bundle rake db:data:load
rake aborted!
PG::Error: ERROR:  current transaction is aborted, commands ignored until end of transaction block
: DELETE FROM "admins"

Tasks: TOP => db:data:load
(See full trace by running task with --trace)

The problem was the admins table was not actually in the database, but this was not apparent to me from the log. And running with --trace did not improve the error message at all. Is it possible a more descriptive error from postgres is getting swallowed by yaml_db somewhere? Or is a transaction swallowing it?