Bug #586
[PATCH] fix migration 35 for mysql (deal with both strings and int)
| Status : | Closed | Start : | ||
| Priority : | Normal | Due date : | ||
| Assigned to : | tobi - | % Done : | 0% |
|
| Category : | backend | |||
| Target version : | - | |||
| Resolution : | fixed |
Description
Seems that mysql translates certain types of database int fields into Strings for internal representation. This breaks migration 35 which assumes int.
Solution is to use to_i which is a no-op for int, and converts to int for String.
Attached is a patch against r721 of trunk (according to svk)
Associated revisions
Upgrade bundled RedCloth to v3.0.4 (closes #586)
History
12/12/2005 06:05 AM - adam-greenfield-site5-com -
I can't reproduce this issue - or understand what would cause ActiveRecord to return a string for an INT column - but to_i works the same on String and Fixnum - so I don't see any harm in it being applied.