yii2mod / yii2-settings

Persistent settings in Yii2
MIT License
102 stars 33 forks source link

Suggest to change "camelCase" column name to "camel_case" #11

Closed ihipop closed 7 years ago

ihipop commented 7 years ago

https://github.com/yii2mod/yii2-settings/blob/0c9160253dc1149b43b9d8d3723d462bf691081d/migrations/m150227_114524_init.php#L28

  1. In Yii2's TimestampBehavior ,Default $createdAtAttribute is camel_case style

  2. camel_case style column name is most common database practise supported by PDO

  3. when writing a SQL by hand,camel_case style can keep the consistency of SQL, to avoid a mixed use of camelCase and camelcase

  4. TableName in CamelCase is unacceptable on consistency when deploying among different databases and platforms supported by PDO

This is just a Suggestion

ihorchepurnyi commented 7 years ago

Hi, thanks for issue. We have plans for change columns/table-names in all our repos. In the next few days we'll start.

ihipop commented 7 years ago

@igor-chepurnoi if there was any Break Compatibility change,Suggest to start a new major version eg. 2.x to 3.x , I use "^2.2" in composer.json https://getcomposer.org/doc/articles/versions.md#caret

ihorchepurnyi commented 7 years ago

ok, thanks for help

ihorchepurnyi commented 7 years ago

Resolved by #12

ihorchepurnyi commented 7 years ago

Please execute new migration by the following command:

$ php yii migrate --migrationPath=@vendor/yii2mod/yii2-settings/migrations