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
MysqlAdapter::getDropForeignKeyByColumnsInstructions() fetches the same constraint name many times if a foreign key contains more than one column. It then creates the same DROP statement as many times as there are columns in the key. Furthermore, if the same column is used in many foreign keys, they all may be dropped (depending on ordering).
I didn't test this, but I believe the query could be fixed about so:
MysqlAdapter::getDropForeignKeyByColumnsInstructions()
fetches the same constraint name many times if a foreign key contains more than one column. It then creates the same DROP statement as many times as there are columns in the key. Furthermore, if the same column is used in many foreign keys, they all may be dropped (depending on ordering).I didn't test this, but I believe the query could be fixed about so:
This would fix my use case, but I don't know if there are other cases where dropping multiple constraints would be required.
EDIT: tested the query and fixed the constraint_type check.
The text was updated successfully, but these errors were encountered: