Bug #586

[PATCH] fix migration 35 for mysql (deal with both strings and int)

Added by clarsen-ilanyo-com - 949 days ago. Updated 949 days ago.

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

Revision 809
Added by scoop 929 days ago

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.

12/12/2005 07:33 AM - anonymous -

  • Status changed from New to Closed
  • Resolution set to fixed

pdcawley commited this patch in r800

Also available in: Atom PDF