简体   繁体   中英

Yii2 Migration Not Update Database

the system does not see my migration file. I created new migrate and php yii migrate --migratePath=@common/migrations/ then no new rule. Can anyone figure it out?

Apply this to you console/config/main.php(advanced)

'controllerMap' => [
    'migrate' => [
        'class' => \yii\console\controllers\MigrateController::class,
        'migrationPath' => [
            '@common/migrations',
        ],
    ],
],

Yii Migration Namespace

Then you have to call

yii migrate/up

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM