Rails Migration Data Types – MySql – Postgresql – SQLite

Rails mysql postgresql sqlite
:binary blob bytea blob
:boolean tinyint(1) boolean boolean
:date date date date
:datetime datetime timestamp datetime
:decimal decimal decimal decimal
:float float float float
:integer int(11) integer integer
:string varchar(255) * varchar(255)
:text text text text
:time time time datetime
:timestamp datetime timestamp datetime

Posted on April 19, 2009 at 2:39 pm by Jordan Carter · Permalink
In: Uncategorized · Tagged with: , , ,

One Response

Subscribe to comments via RSS

  1. Written by Rob Morris
    on September 20, 2012 at 6:04 am
    Permalink

    Note: Postgres does not have a native float type – float with no arguments will result in a double precision native type, or 8-byte floating point value.

    See the docs here: http://www.postgresql.org/docs/8.2/static/datatype-numeric.html

Subscribe to comments via RSS

Leave a Reply