Comments (5)
Ok, try it
return [
...
'controllerMap' => [
'migrate' => [
'class' => 'yii\console\controllers\MigrationController',
],
],
...
];
Do not put it inside 'components' => []
from yii2-pgsql-audit.
It is my bad with above array ( .. ) section inside extensions.php, now when I visit Boostrap.php
of yii2-pgsql-audit, it fall to map the migration to app scope, I think. So for now I still don't understand how the map can be made to external migrations folder / scope.
Edit. the error log likes this
Exception 'yii\base\InvalidConfigException' with message 'Object configuration must be an array containing a "class" element.'
from yii2-pgsql-audit.
Hi. Try to setup MigrateController
in console/config/main.php
:
return [
...
'controllerMap' => [
'migrate' => [
'class' => 'yii\console\controllers\MigrateController'
'migrationPath' => '@console/migrations',
],
],
...
];
from yii2-pgsql-audit.
Hi Tigrov,
Thanks for your reply, and I can't find the console/config/main.php
but config/console.php
. Therefore I try with
return [
'bootstrap' => [
// The component registers own console commands
],
'components' => [
'controllerMap' => [
'migrate' => [
'class' => 'yii\console\controllers\MigrationController',
'migrationPath' => '@console/migrations',
],
],
]
];
and still have the same error log when running migration
from yii2-pgsql-audit.
yeah, that's I also realize just right after I post the comment, the 'controllerMap'
should stay on top level as your instruction. I also made the typo with MigrateController :D
return [
...
'controllerMap' => [
'migrate' => [
'class' => 'yii\console\controllers\MigrateController',
],
],
];
and it works perfectly. Might be the README update should help other users. Again, thank you very much 👍
from yii2-pgsql-audit.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yii2-pgsql-audit.