Hi I''m using integer for most of my numeric data, and this is fine, but the system I am building will convert my data structures OLTP to OLAP for reporting. This will require TONS of data to be saved. In an effort to reduce wasted space I''d rather use tinyint/smallint and other such more precise data types in mysql. Couldn''t find any documentation about these ''nonstandard'' data types. In addition I couldn''t find anything on use column options like "unsigned". Thanks. -- Posted via 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On 6/10/07, Jean Nibee <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> I''m using integer for most of my numeric data, and this is fine, but the > system I am building will convert my data structures OLTP to OLAP for > reporting. This will require TONS of data to be saved. In an effort to > reduce wasted space I''d rather use tinyint/smallint and other such more > precise data types in mysql. > > Couldn''t find any documentation about these ''nonstandard'' data types. In > addition I couldn''t find anything on use column options like "unsigned".Pass a string as the column type and it''ll be interpreted as a literal sql fragment: t.column :foo, ''tinyint(2) unsigned'' Be sure not to use tinyint(1) since it''s used for booleans only. jeremy --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Jeremy Kemper wrote:> > Pass a string as the column type and it''ll be interpreted as a literal > sql fragment: > t.column :foo, ''tinyint(2) unsigned'' > > Be sure not to use tinyint(1) since it''s used for booleans only. > > jeremyThanks! Where did you find out about this anyway? -- Posted via 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---