1. URL for 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 \ and an error occurs:

1_075311_add_oauth2_server::primaryKey() should be compatible with yii\db\Migrat
ion::primaryKey($length = NULL)’
3. Modify the file: \yii2-oauth2-rest-template\vendor\filsh\yii2-oauth2-server\migrations\m140501_075311_add_oauth2_server.php

4. Run the command again: php application/api/yiic migrate –migrationPath=@vendor/filsh/yii2-oauth2-server/migrations –interactive=0 \ , and it runs normally:

