>> I want to use bigint sql type for a model's id. How can I do this in
>> migration? Should I just use the integer ruby type?
> 
> Just use
>   t.integer :foo, :limit => 8

I'm pretty sure that doesn't do what you think it does. It creates a an 
int(8) in mysql (as opposed to the default which is int(11)) but this 
does not affect the size of the number that can be stored in the field. 
An int field in mysql is 32 bits long regardless of the :limit you set 
(that's only the 'display' length).

If you want to store numbers greater than 2147482624 you hvae to use 
bigint.

steve

-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to