Ruby on Rails迁移中的sql – unsigned int字段?
发布时间:2020-12-16 22:03:00 所属栏目:百科 来源:网络整理
导读:我如何使人口无符号? def self.up create_table :cities do |t| t.string :name t.integer :population t.float :latitude t.float :longitude t.timestamps end end 解决方法 这应该适合你. t.column :population,'integer unsigned'
我如何使人口无符号?
def self.up create_table :cities do |t| t.string :name t.integer :population t.float :latitude t.float :longitude t.timestamps end end 解决方法
这应该适合你.
t.column :population,'integer unsigned' (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |