fesplugas/rails-trash — Issue #3: Not able to run migrations after has_trash is added to a model
Author: Exoth
Created: 2012-02-07 07:27:56+00:00
State: open

In particular, I'm not able to setup typus dummy application.

"bundle exec rake db:setup" on the dummy application results in:

rake aborted!
PGError: ERROR: relation "entries" does not exist
LINE 4: WHERE a.attrelid = '"entries"'::regclass
^
: SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull
FROM pg_attribute a LEFT JOIN pg_attrdef d
ON a.attrelid = d.adrelid AND a.attnum = d.adnum
WHERE a.attrelid = '"entries"'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
ORDER BY a.attnum

So I remove has_trash from entry_trash.rb and only then db:setup works.