How To Up/down All Migration From All Modules

(Denis Porplenko) #1


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:

(Denis Porplenko) #3


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


It is referenced in that issue:

(Pellicanipasquale) #5

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


(Denis Porplenko) #6

Thanks, it works for me.

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

(Samirmj6) #7

(Jkofsky) #8

A batch file could be used.

(billelham) #9

php yii migrate/down all