【问题标题】:How to specify float format in doctrine 1.2 schema?如何在学说 1.2 模式中指定浮点格式?
【发布时间】:2011-10-04 05:19:06
【问题描述】:

当我在学说 1.2 架构文件中使用这种表示法时 some_float_field: { type: float } 学说为它生成 SQL some_float_field FLOAT(18, 2)

但我需要更多小数点后的数字,例如FLOAT(18,10)。有没有办法在架构文件或学说配置中指定浮点格式?

你可能知道doctrine包中的什么文件从schema文件生成sql吗?

【问题讨论】:

    标签: php floating-point doctrine schema


    【解决方案1】:

    不确定浮点数,但小数是

    type: decimal(18)
    scale: 10
    

    我猜float应该是类似的东西

    【讨论】:

      猜你喜欢
      • 2015-03-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-10-18
      • 1970-01-01
      • 2012-03-26
      • 2011-06-19
      • 2015-05-25
      相关资源
      最近更新 更多