float doesn't work in sexy_migrations
Reported by Stephen Touset | May 7th, 2007 @ 12:49 AM
Using a column of type "float" doesn't work using sexy_migrations. At least, not with PostgreSQL.
Comments and changes to this ticket
-
Chris Wanstrath May 7th, 2007 @ 12:49 AM
- State changed from new to open
- Assigned user set to Chris Wanstrath
-
Stephen Touset May 7th, 2007 @ 12:49 AM
I fixed it by (slightly) modifying simplified_type. The second parameter is set to 0, rather than false. This doesn't appear to break anything else, on the surface, but test it thoroughly.
def simplified_type(type)
ActiveRecord::ConnectionAdapters::Column.new(
:type_check, 0, type.to_s
).type
end
-
Chris Wanstrath May 7th, 2007 @ 12:49 AM
- State changed from open to resolved
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป