开发者

How to create a GUID column? I tried string with :length => 36 but is created varchar(255)

I want to create a database field to store a GUID.

I did this:

add_column :users, :user_guid, :string, :length => 36

But it just crea开发者_运维知识库ted a column of varchar(255)


Rails doesn't have length, it have limit

add_column :users, :user_guid, :string, :limit => 36
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜