我正在尝试以这种方式为 yml 文件上的 profile_percentage 字段设置默认值
...
....
profilePercentage:
type: float
column: profile_percentage
nullable: false
options:
comment: Profile surveys completed percentage
default: 0
为了避免手动设置字段
$client->setProfilePercentage(0.0);
但是通过这种配置,我会收到以下消息:
SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'profile_percentage' cannot be null