合法的字段类型有以下这些: 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等,并解释了如何使用limit、default等选项来定义字段属性。
70

被折叠的 条评论
为什么被折叠?



