doctrine/DoctrineMigrationsBundle

Add option --mapping on migrations:diff

jeffersonvantuir opened this issue · 0 comments

The doctrine configuration allows having 1 entityManager with multiple mappings, as shown below.

        ......
        entity_managers:
            default:
                connection: default
                mappings:
                    App:
                        is_bundle: false
                        type: annotation
                        dir: '%kernel.project_dir%/src/Entity'
                        prefix: 'App\Entity'
                        alias: App
                    EntitiesBundle:
                        is_bundle: true
                        type: annotation

In this way, it would be interesting that the diff command had the parameter --mapping=EntitiesBundle or --mapping=App

Current problem: If my entities are being migrated to an orm bundle, and I want to keep the mapping of the Bundle and my App in the same entity_manager, the diff throws an error stating:

The table with name 'database01.my_table' already exists.