Rails Migration Data Types

Had someone ask where to find the available data types for Rails migrations today – and thought it would be good to keep a copy for my own reference. Heres the list:

Rails -> MySQL
:binary -> blob
:boolean -> tinyint(1)
:date -> date
:datetime ->datetime
:decimal -> decimal
:float ->float
:integer -> int(11)
:string -> varchar(255)
:text -> text
:timestamp -> datetime
:time -> time


About this entry