How To Up/down All Migration From All Modules


(Denis Porplenko) #1

Hi

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.

Thanks


#2

This is currently not possible in one command. This feature is planned: https://github.com/yiisoft/yii2/issues/384


(Denis Porplenko) #3

thanks

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


#4

It is referenced in that issue: https://github.com/dmstr/yii2-migrate-command


(Pellicanipasquale) #5

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

thanks


(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