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
After update doctrine/doctrine-bundle to version 1.11.x, migrations not working properly with "schema_filter" option #821
Comments
Thanks for fast response. @bendavies - Could you create PR in this project with my suggestions? |
hello @mleko64. I raised that PR before you raise this issue - I'm merely linking two related issues together. Thanks |
This was fixed in 2.1.0, closing here. |
Bug Report
Symfony version: 4.2.8
doctrine/doctrine-bundle: 1.11.0
doctrine/dbal: 2.9.2
doctrine/doctrine-migrations-bundle: 2.0.0
Summary
After update "doctrine/doctrine-bundle" from version 1.10.x to 1.11.x, migrations not working properly. I'm using the "schema_filter" option and I realized that this option stops working.
I reviewed the changes and came to the conclusion that the following line should be added to the file "src/Kernel.php" (in "build" method):
After that, "schema_filter" option starts working, BUT only from one side (only DB tables are filtered, but entity classes not).
I looked into "migrations/lib/Doctrine/Migrations/Generator/DiffGenerator.php" file and I noticed that in method "createToSchema" (around line 104) is used deprecated method:
In my opinion, should be this method (new one):
And "if" statment (in "foreach" loop) should be:
When I'm change this two things, everything works perfectly.
Current behavior
Diff command not works properly with "schema_filter" option (only table names are filtered, entity classes not).
I have a entity classes with table name which should not be process while diff changes.
How to reproduce
Expected behavior
"schema_filter" option should be work properly (filtering table names and entity classes).
The text was updated successfully, but these errors were encountered: