有人可以解釋我如何正確指定我的modules migration namespaces
?正如我在文檔中看到的,它是:如何在yii2中正確指定遷移命名空間類?
return [
'controllerMap' => [
'migrate' => [
'class' => 'yii\console\controllers\MigrateController',
'migrationNamespaces' => [
'app\migrations', // Common migrations for the whole application
'module\migrations', // Migrations for the specific project's module
'some\extension\migrations', // Migrations for the specific extension
],
],
],
];
但是沒有解釋應在哪個文件中寫入命令。我試過它在config.php,因爲:
'controllerMap' => [
'migrate' => [
'class' => 'yii\console\controllers\MigrateController',
'migrationNamespaces' => [
'app\modules\adBoard\migrations',
],
但我不知道應該寫哪個控制器類。有人能告訴我在哪個文件中我必須指定它,以及如何正確指定它?
試圖將我提到的命令輸入到'console.php'文件(因爲'basic'模板),但沒有工作:(由於命名空間,我無法運行我的遷移,當我刪除它時,它是加工 – HELPME