Have you tried dm-migrations. The property mapping in a model isn't really for special cases. Not sure about the problem you're having with Enum, but you can always subclass it to your own version that uses the column type you desire (since it is different than the functionality currently).
On May 19, 5:30 pm, Dan Sosedov <[email protected]> wrote: > Hey, > > I have couple of questions about properties (i use latest available > version 0.10.2) in MySQL adapter > > 1. Enum type. > > In previous versions of datamapper (not sure, about 0.9.x) after > migrations (DataMapper::auto_migrate!) enum property in database was > specified as internal data type (ENUM) which is 65k rows, 4 bytes > integer. But in last versions its being replaced with INTEGER type, > signed. I assume its not efficient to keep such properties as fullsize > integer number even if property has only 3 enumerations > (:one, :two, :three). Whats the best way to replace it to proper > datatype? Right now i go directly to db schema and change everything i > need manually. Please advice. > > 2. Unsigned small number types. > > Is there any property type or parameter to handle size and attributes > of numeric fields ? Lest say i need to create UNSIGNED SMALLINT field > for counter. Again, i do it manually from mysqladmin after i migrate > database schema. > > I like datamapper itself but such small things frustrate me. > > Thanks. > Dan. > > -- > You received this message because you are subscribed to the Google Groups > "DataMapper" 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 > athttp://groups.google.com/group/datamapper?hl=en. -- You received this message because you are subscribed to the Google Groups "DataMapper" 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/datamapper?hl=en.
