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
Table in default schema is recreated (when the schema is specified) #1196
Comments
I can confirm this. Reported it in Symfony as I thought it was a Symfony component. |
I can also confirm this behaviour.
Interesting about this: The schema name gets ignored completely. It always adds "CREATE SCHEMA public" to the down method of the migration. So I decided to remove the schema from my database url, anyway Doctrine keeps adding it to my migrations. |
I also encountered this, but for me it's the ALTER instructions, as we already had an existing schema on older versions. My whole In my case only 3 fields changed (new comment, migration from guid to uuid), and I got 12 lines modifying all entities and all of their fields, not only the changed ones. And my schema is on the entity as PHP attributes |
I found the root issue and opened a PR doctrine/dbal#5600 with full explanation here doctrine/dbal#5609 |
Bug Report
Summary
If a schema is explicitly specified - the table is recreated every migration:
This generates this initial migration:
Then I apply the migration and run
diff
once again, and it generates the following migrationFrom the other hand - if I don't specify the schema explicitly the second diff generates
which is also wrong as it should not recreate the
public
schema.Current behavior
How to reproduce
Expected behavior
It should not try to recreate a table given it has not changed.
The text was updated successfully, but these errors were encountered: