`

Migration and Database Column Types

阅读更多

rails下迁移类与数据库类型对照表:

 

 

 

Migration and Database Column Types


 


db2 mysql openbase oracle
:binary blob(32768) blob object blob
:boolean decimal(1) tinyint(1) boolean number(1)
:date date date date date
:datetime timestamp datetime datetime date
:decimal decimal decimal decimal decimal
:float float float float number
:integer int int(11) integer number(38)
:string varchar(255) varchar(255) char(4096) varchar2(255)
:text clob(32768) text text clob
:time time time time date
:timestamp timestamp datetime timestamp date






postgresql sqlite sqlserver sybase
:binary bytea blob image image
:boolean boolean boolean bit bit
:date date date datetime datetime
:datetime timestamp datetime datetime datetime
:decimal decimal decimal decimal decimal
:float float float float(8) float(8)
:integer integer integer int int
:string character varying(256) varchar(255) varchar(255) varchar(255)
:text text text text text
:time time datetime datetime time
:timestamp timestamp datetime datetime timestamp

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics