Migration data types / column types
June 21st, 2007
The data types or columns types as they are called are little bit hard to find for somebody who ist not yet really familiar with rails language.
Now here what I found about this:
The columns types are:
:integer
:float
:datetime - default format: ‘2007-07-06 17:05:22′
:date - default format: ‘2007-06-07′
:timestamp
:time
:text
:string
:binary
:boolean
According options are:
:limit, e.g. :limit => 32
:default, e.g. :default => “defaultvalue”
:null, e.g. :null => true means its nullable
and for native data types:
:precision, ??
:scale, ??