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

schema.rb is borked when enum is used #31

Open
fringd opened this issue Sep 9, 2011 · 3 comments
Open

schema.rb is borked when enum is used #31

fringd opened this issue Sep 9, 2011 · 3 comments

Comments

@fringd
Copy link
Contributor

fringd commented Sep 9, 2011

did add_column :interests, :status, :enum

migration ran, but got this in schema.rb where my table should have apeared:

# Could not dump table "interests" because of following StandardError
#   Unknown type 'enum' for column 'status'
@fringd
Copy link
Contributor Author

fringd commented Sep 9, 2011

I think the issue here is that add_column doesn't work... pulled the very very latest and used change_table instead. works fine.

@sairam
Copy link

sairam commented Oct 19, 2011

change_table also gave me the same error.

@yclian
Copy link

yclian commented Mar 26, 2012

The enumerated column attribute must be declared as a STRING in the database schema.

Take a look at your DB in what type it is stored. Mine (SQLite) is stored as an 'enum' and it went borked during a migration rollback.

Hand-fix the DB and use :string instead of :enum in migration (despite the code suggests to me that this is handled).

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

3 participants