I
I
Ilya Beloborodov2017-02-19 02:01:57
Yii
Ilya Beloborodov, 2017-02-19 02:01:57

Why is the migration not running?

First time like this. The fact is that this migration was performed in another project a month ago

➜  skelet.loc php yii migrate [email protected]/amnah/yii2-user/migrations
Yii Migration Tool (based on Yii v2.0.12-dev)

Total 1 new migration to be applied:
        m150214_044831_init_user

Apply the above migration? (yes|no) [no]:yes
*** applying m150214_044831_init_user
PHP Fatal Error 'yii\base\ErrorException' with message 'Class 'm150214_044831_init_user' not found'

in /Applications/AMPPS/www/skelet.loc/vendor/yiisoft/yii2/console/controllers/MigrateController.php:191

Stack trace:
#0 [internal function]: yii\base\ErrorHandler->handleFatalError()
#1 {main}

how to fix it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
padlyuck, 2017-02-19
@kowap

the migration in this package already has a namespace, and the documentation for the package has not been updated yet. try

php yii migrate --migrationNamespaces=amnah\\yii2\\user\\migrations

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question