Doctrine2 migrations migrate down and migrate from browser and not command line

I saw this doc on Symfony's website : http://symfony.com/doc/current/bundles/DoctrineMigrationsBundle/index.html#usage

There is doctrine:migrations:execute that allows you to execute a single migration version up or down manually... but never tried, sorry.

Hope this helps !

Keep us posted.


You can optionally manually specify the version you wish to migrate to:

 php doctrine.php migrations:migrate YYYYMMDDHHMMSS

or execute a migration up/down

php doctrine.php migrations:execute YYYYMMDDHHMMSS  --down
php doctrine.php migrations:execute YYYYMMDDHHMMSS  --up

You can found YYYYMMDDHHMMSS using:

php doctrine.php migrations:status
>> Current Version:           2012-12-20 23:38:47 (20121220233847)
>> Latest Version:            2012-12-20 23:38:47 (20121220233847)

If you want to migrate 1 step down, you can use this syntax:

./doctrine migrations:migrate prev

To go to the first migration:

./doctrine migrations:migrate first

To go to the next migration:

./doctrine migrations:migrate next

Source: https://www.doctrine-project.org/projects/doctrine-migrations/en/1.8/reference/managing_migrations.html#managing-migrations