Migrations per Bundle #109

KingCrunch opened this Issue Jan 29, 2013 · 4 comments


None yet
4 participants

Currently it is only possible to have a single folder with the migrations in it, usually in app/DoctrineMigrations. I don't know complicated this may be, or which pitfalls can appear, but I think it would be interesting, if it is possible to have different migrations per bundle. I thougt of something similar to DoctrineFixturesBundle, but for migrations.

I think you want this doctrine/DoctrineORMModule#118

Something like, yes, but for Symfony2 as bundle 😉 I havent looked into this PR yet and I don't know exactly how the migrations internaly work

The migrations should be executed even if they have a smaller "version number" as previously executed ones. I mean: The migration steps should be all handled completely separate per bundle ("path"). At least that was my initial idea.

GCth commented May 14, 2013

You may try https://github.com/GCth/DoctrineMigrationsBundle - i had similar problem in my projects with shared database and shared bundles. The change is pretty trivial.


mikeSimonson commented Jul 31, 2015

If you want a migration per bundle you should just have multiple migration configuration.
But trying to share those migration in a bundle is probably a bad idea (impossible to prevent conflicts).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment