REST API Application with OAuth2 Server on Yii2, the solution to the error reported in Run Migrations!
1. The address of the REST API application with OAuth2 Server on Yii2:https://github.com/ikaras/yii2-oauth2-rest-template
2. Run the command: php application/api/yiic migrate –migrationpath=@vendor/filsh/yii2-oauth2-server/migrations –interactive=0 \ Error:

php strict warningYii\Base\ErrorExceptionwith messageDeclaration of M14050
1_075311_add_oauth2_server::primaryKey() should be compared with yii\db\migrat
ION::PrimaryKey($length = null)
3. Modify the file: \yii2-oauth2-rest-template\vendor\filsh\yii2-oaut h2-server\migrations\m140501_075311_add_oauth2_server.php

Need set null on default in primaryKey function public function primaryKey($columns = null) or rename function
4. Run the command again: php application/api/yiic migrate –migrationpath=@vendor/filsh/yii2-oauth2-server/migrations –interactive=0\ , normal operation:

