I know that I can run specific migrations using execute with up / down and version number, ie
doctrine:migrations:execute YYYYMMDDHHMMSS –down
My question then – is there an easier way to simply run the next or previous migration without having to look up version numbers?
Ideally I would like something like
doctrine:migrations:execute –down n
Where n is the number of migrations to run from current in the specified direction.
(same idea as rake db:rollback STEP=n)
i usually just call status, which shows if there any new ones. If so then I call migrate, and it runs all the new ones. See Docs here http://docs.doctrine-project.org/projects/doctrine-migrations/en/latest/reference/introduction.html
In the manual of DoctrineMigrationsBundle talk about migrations by YYYYMMDDHHMMSS. Because n is not the number but a date. You may excecute status and watch last version of you changed
php app/console doctrine:migrations:status --show-versions
Closest thing to what I was looking for is:
These cannot be used in conjunction with n though, so if you want to do more than 1 you need to use doctrine:migrations:migrate with the version number you want to go to.