Symfony doctrine migrations up and down

Problem

You would like to run a migration in a symfony 2x project either up or down.

Solution

You can run the following for getting a migration up or down:

php app/console doctrine:migrations:execute 20171020125225 --up

php app/console doctrine:migrations:execute 20171020125225 --down