-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
#Integer ignores options (without raising an error) #483
Comments
:size and :unsigned have never been a recognized options for the Integer generic type. :size only works by accident with column :integer, though for backwards compatibility it will still be recognized. Use The idea here is that using when generic types (ruby class names), the options recognized are specific to the generic type. Unless it is specifically documented as supported in http://sequel.rubyforge.org/rdoc/files/doc/schema_modification_rdoc.html or in the database adapter RDoc, you should not assume other options will affect the database type used. With the specific type support (column :integer), there is some generic options handling that is done for all options types, and for backwards compatibility cannot change (as it would break old migrations). I do not encourage relying on this behavior in new code. For database specific types like the ones you are using, I recommend using a string for the type name. |
I think there is a bug on that documentation page, as it indicates that :size and :unsigned are universally usable, when that isn't the case. I'll fix that. |
Thanks Jeremy! |
e.g.
I had a look, but I can't see any reason why #Integer shouldn't just delegate to #column and work.
I've been using the MySQL adapter.
Any ideas?
The text was updated successfully, but these errors were encountered: