Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot configure observer for class with bitmask-attribute #4

Open
m5rk opened this issue May 4, 2010 · 0 comments
Open

Cannot configure observer for class with bitmask-attribute #4

m5rk opened this issue May 4, 2010 · 0 comments

Comments

@m5rk
Copy link

m5rk commented May 4, 2010

If I try to configure an observer for a class that contains a bitmask attribute, all hell breaks loose.

Here's the error when I do rake db:migrate:reset, for instance::

$ rake db:migrate:reset (in /Users/mark/proj/marafunds) rake aborted! PGError: ERROR: relation "users" does not exist LINE 4: WHERE a.attrelid = '"users"'::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 = '"users"'::regclass AND a.attnum > 0 AND NOT a.attisdropped ORDER BY a.attnum

The workaround is to disable the observer, run the rake db:migrate:reset, then re-enable.

teeparham referenced this issue in teeparham/bitmask_attributes Mar 20, 2012
ryanlchan referenced this issue in ryanlchan/bitmask_attributes Apr 21, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant