Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
ihipop opened this issue Apr 13, 2017 · 5 comments
Closed

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

ihipop opened this issue Apr 13, 2017 · 5 comments

Comments

@ihipop
Copy link
Contributor

ihipop commented Apr 13, 2017

'createdAt' => $this->integer()->notNull(),

  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

@ihipop ihipop changed the title Suggest to change camelCase column name to camel)case Suggest to change "camelCase" column name to “camel_case” Apr 13, 2017
@ihipop ihipop changed the title Suggest to change "camelCase" column name to “camel_case” Suggest to change "camelCase" column name to "camel_case" Apr 13, 2017
@ihorchepurnyi
Copy link
Contributor

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
Copy link
Contributor Author

ihipop commented Apr 13, 2017

@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
Copy link
Contributor

ok, thanks for help

@ihorchepurnyi
Copy link
Contributor

Resolved by #12

@ihorchepurnyi
Copy link
Contributor

ihorchepurnyi commented Apr 13, 2017

Please execute new migration by the following command:

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants