There is no loss of precision:
"Floating-point and fixed-point types also can be UNSIGNED. As with integer
types, this attribute prevents negative values from being stored in the column.
However, unlike the integer types, the upper range of column values remains the
same."
http://dev.mysql.com/doc/refman/5.0/en/numeric-types.html
when "float"
default = " DEFAULT #{column[:default].nil? ? 'NULL' : column[:default].to_f}" if default
"real"
+ when "float unsigned"
+ default = " DEFAULT #{column[:default].nil? ? 'NULL' : column[:default].to_f}" if default
+ "real"
when "decimal"
default = " DEFAULT #{column[:default].nil? ? 'NULL' : column[:default]}" if default
"numeric(#{column[:length] || 10}, #{column[:decimals] || 0})"