rails 迁移migrate model对应的数据库字段类型

 
Rails Migration Data Types – MySql – Postgresql – SQLite

Railsmysqlpostgresqlsqlite
:binaryblobbyteablob
:booleantinyint(1)booleanboolean
:datedatedatedate
:datetimedatetimetimestampdatetime
:decimaldecimaldecimaldecimal
:floatfloatfloatfloat
:integerint(11)integerinteger
:stringvarchar(255)*varchar(255)
:texttexttexttext
:timetimetimedatetime
:timestampdatetimetimestampdatetime
已标记关键词 清除标记
©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页