Search code examples
yii2migrationdatabase-migration

Yii2 - migration can't be applied


I wanted to apply migrations, but it won't let me do that.

cmd looks like this:

D:\web\website>yii migrate --migrationPath=@yii/rbac/migrations
Yii Migration Tool (based on Yii v2.0.35)

Total 5 new migrations to be applied:
        sjaakp\pluto\migrations\m000000_000000_init
        m140506_102106_rbac_init
        m170907_052038_rbac_add_index_on_auth_assignment_user_id
        m180523_151638_rbac_updates_indexes_without_prefix
        m200409_110543_rbac_update_mssql_trigger

Apply the above migrations? (yes|no) [no]:
D:\web\website>

It won't let me type 'yes' to apply to the migrations.

Anyone an Idea what I can do?
Thanks.


Solution

  • Ustmaestro gave a helpful answer:

    I dont know wath is the problem with your terminal, but You can do it by applying yes default using with --interactive=0 in migration command like following: yii migrate --interactive=0 --migrationPath=@yii/rbac/migrations