Changes
Title
unchanged
Execute migration on server/linux using shell
Category
unchanged
How-tos
Yii version
unchanged
Tags
changed
shell, command, migration
Content
changed
[...]
```
But since you cannot confirm or reject because you are executing php file you put "yes" before that command and it knows that after executing main command it has to confirm. You can put "no" instead.
Before executing file on your server, do it locally on your laptop using XAMPP to test it and see output.
________________________________________________________________________________________
This is working
:
```php
exec('yes | php yii migrate/up --migrationPath=@vendor/dektrium/yii2-user/migrations')
```
but I guess this would work also, I didn't test
this one:
```php
exec('php yii migrate/up --migrationPath=@vendor/dektrium/yii2-user/migrations | yes')
```