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
Using existing dbal connection for db-configuration #1324
Comments
Use DoctrineMigrationsBundle, which integrates the doctrine/migrations library with the Symfony framework, exposing the commands in the Symfony |
This also assumes that you use |
Hello @stof, Adding that dependency to the project is not an option at this moment. Is that the only way to reuse an existing connection? Thank you! |
Well, if you want to reuse the connection configured through Symfony, you would have to run the commands through the Symfony console, not through so the alternative is to re-do manually most of the configuration done in DoctrineMigrationsBundle (but then, I'm wondering why you would not use the official integration instead) |
Support Question
In a Symfony project, I have these two dependencies installed:
I have several db connections defined in Symfony, one of them is:
To run the migrations in the application I execute:
vendor/bin/doctrine-migrations migrate --configuration=doctrine-config.php --db-configuration=doctrine-db.php
The content of doctrine-config.php is:
The content of doctrine-db.php is:
I wonder if there is a way to reuse the defined connection
db.connection
when running the migration to avoid writing the file doctrine-db.php.Thanks!
The text was updated successfully, but these errors were encountered: