Skip to content

Add option --mapping on migrations:diff #500

@jeffersonvantuir

Description

@jeffersonvantuir

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions