我在Sequel中创建了一个迁移:
Sequel.migration do
up do
create_table(:products) do
primary_key :id
String :name, :null=>false
Numeric :price, :null=>false
Text :description, :null=>false
end
end
down do
drop_table(:products)
end
end我使用Numeric类型表示价格,现在当我在表单中输入"5“时,它从我的数据库中返回0.5E1。我做错了什么?
https://stackoverflow.com/questions/38354829
复制相似问题