|
Table Definition - Better binary support w/MySQL: msg#00220lang.ruby.rails.core
I work with Rails purely on MySQL, so I can't say how this is handled with Oracle, DB2, etc. However, when you create table columns with rails, you may specify :string, :text, or :binary, with or without :limits. In the case of :string, setting the limit uses varchar(N) appropriately up until 65,532, at which point it switches over to mediumtext as it should. With :text, it will use tinytext up until a limit of 255 - if you specify :limit => 500, for instance, it is smart enough to switch to text. However, when using :binary, limits of under 255 get tinyblob, then switch over to blob. What I would propose is that with the :binary type, when limits are specified, VARBINARY (equivalent to VARCHAR) should be used, as it saves space, and is the most appropriate type. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@xxxxxxxxxxxxxxxx To unsubscribe from this group, send email to rubyonrails-core-unsubscribe@xxxxxxxxxxxxxxxx For more options, visit this group at http://groups.google.com/group/rubyonrails-core -~----------~----~----~----~------~----~------~--~---
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: ActiveSupport::Multibyte for better Unicode support, Manfred Stienstra |
|---|---|
| Next by Date: | Re: resource_feeder feedback, DHH |
| Previous by Thread: | resource_feeder feedback, Sam Ruby |
| Next by Thread: | Re: Table Definition - Better binary support w/MySQL, DHH |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |