yiidatabase-migrationyii-migrations

CConsoleApplication.defaultController not defined when creating new migration


I'm trying to use the yii migration system but I'm stuck on this error when I execute this commande:

yiic migrate create add_table_test

I get this error:

exception 'CException' with message 'Property   CConsoleApplication.defaultController" is not defined'

(CCompenent.php:173)

But I've defined a defaultController in my config file:

'basePath'=>$rootPath,
'defaultController' => 'person/index',
'homeUrl'=>array('/me'),

I spent hours looking on Google, but I can't find a solution.

Does anyone have an idea about this problem?


Solution

  • The problem is, that you've actually defined the property defaultController in your config/console.php but as the error message says the CConsoleApplication has no such property.

    So just remove defaultController from your console config.