合法的字段类型有以下这些: binary, boolean, date, datetime, decimal, float, integer, string, time, 以及 timestamp。可用的选项有:limit, default, and null. 比方说 :null => false 用来指定该字段不能为空。这非常容易理解。
rails创建表可用字段类型及限制。
最新推荐文章于 2020-09-30 14:05:17 发布
合法的字段类型有以下这些: binary, boolean, date, datetime, decimal, float, integer, string, time, 以及 timestamp。可用的选项有:limit, default, and null. 比方说 :null => false 用来指定该字段不能为空。这非常容易理解。