schema.yml中的原则大小写敏感

问题描述:

原则将我的列名变为全部小写字母以提高兼容性。我如何防止这种情况发生?schema.yml中的原则大小写敏感

users: 
    actAs: [Timestampable] 
    columns: 
    userId: 
     type: integer 
     length: 4 
     primary: true 
     autoincrement: true 

$this->hasColumn('userId', 'integer', 4, array(
     'type' => 'integer', 
     'length' => 4, 
     'primary' => true, 
     'autoincrement' => true, 
     )); 

就变成

userid 

这是一个问题,因为我有很多的使用了驼峰公约现有的代码和数据。是否有某种简单的布尔值,我可以改变它以保持我的列完全按照书面?

Yaml转换是问题所在。要解决此问题,您需要在YAML模式文件IE:name:user_id中将列名称别名为userId