Does anyone have a link for a reference on data types in rails to their corresponding data type in the respective db? Ex. t.string = mysql varchar, t.integer = mysql integer.
I answered my own question. Just in case anyone else needs this info I found this in the Rails Framework Documentation under class ActiveRecord::Migration
specified to be one of the following types:
:string,
:text,
:integer,
:float,
:decimal,
:datetime,
:timestamp,
:time,
:date,
:binary,
:boolean.
A default value can be specified by passing an options hash like { :default => 11 }. Other options include :limit and :null (e.g. { :limit => 50, :null => false }) — see ActiveRecord::ConnectionAdapters::TableDefinition#column for details.
Bookmarks