You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When deleting a table with a foreign key reference, queries returned by AbstractPlatform::getAlterSchemaSQL can only be executed only when checking foreign keys is disabled.
Summary
During update from doctrine/dbal: 3.9 to doctrine/dbal: 4.2 I've faced a problem with an order of sql queries that are generated by AbstractPlatform::getAlterSchemaSQL.
I need to delete a table that is being referenced by a foreign key. I am using the next sequence of commands:
Bug Report
When deleting a table with a foreign key reference, queries returned by
AbstractPlatform::getAlterSchemaSQL
can only be executed only when checking foreign keys is disabled.Summary
During update from
doctrine/dbal: 3.9
todoctrine/dbal: 4.2
I've faced a problem with an order of sql queries that are generated by AbstractPlatform::getAlterSchemaSQL.I need to delete a table that is being referenced by a foreign key. I am using the next sequence of commands:
The resulting SQLs can be executed in the returned order only when checking foreign keys is disabled. I am not sure that this is an intended behavior.
Current behavior
The $queries array in the snippet above will end up containing next queries:
Expected behavior
When using version 3.9 $queries array contains next queries:
I believe behavior changed with the deletion of handling of orphaned keys in 0c08553
How to reproduce
You can find repository with a simple app reproducing this behavior here. It works both with 3.9 and 4.2 versions.
The text was updated successfully, but these errors were encountered: