doctrine/DoctrineMigrationsBundle — pull request #46 by pvanliefland (2013-01-26 11:42:11+00:00)
Title: Issue #38 Multiple entity managers support

| Q | A
| ------------- | ---
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | NA
| Fixed tickets | #38
| License | MIT

This PR is an attempt to solve #38 by allowing to specify a different migrations config per entity manager. This feature is targeted at people who use multiple databases for a single Symfony2 project.

As an example :

```yaml
doctrine_migrations:
em1:
dir_name: %kernel.root_dir%/DoctrineMigrations/Em1
namespace: Application\Migrations\Em1
em2:
dir_name: %kernel.root_dir%/DoctrineMigrations/Em2
namespace: Application\Migrations\Em2
```

Notes :

* This additional level of nesting in the config is totally optional, the standard way still works
* An exception is thrown in 2 cases :
* If the config file is defined on a per-entity manager basis but no --em option is provided
* If there is no config entry defined for the provided --em option

Thoughts ?