How To Up/down All Migration From All Modules


I use YII2.

How can I up/down all migration from all modules in one command?

I can do it which one module to set --migrationPath option.

PS I want to save migration from module in directory module.


This is currently not possible in one command. This feature is planned:


maybe you know some extensions or some way, how can i do it?

It is referenced in that issue:

It’s possible performed the command “yiic migrate” automatically without shell access? Maybe from php with exec(); or shell_exec(); ?


Thanks, it works for me.

But It forces me to add new line with migration path in config…

A batch file could be used.

php yii migrate/down all