Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option --mapping on migrations:diff #500

Open
jeffersonvantuir opened this issue Jun 13, 2023 · 0 comments
Open

Add option --mapping on migrations:diff #500

jeffersonvantuir opened this issue Jun 13, 2023 · 0 comments

Comments

@jeffersonvantuir
Copy link

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant