doctrine / dbal

Doctrine Database Abstraction Layer
https://www.doctrine-project.org/projects/dbal.html
MIT License
9.45k stars 1.33k forks source link

Fix foreign key name change detection #6418

Closed achterin closed 4 months ago

achterin commented 4 months ago
Q A
Type bug
Fixed issues #6390

Summary

This changes how the schema comparator treats foreign key name changes. The index renaming had the same behavior in the past, expecting a index name change to result in an empty table diff. This was changed some time ago but foreign key changes were still not picked up by the comparator. This pr will change that. While at it, I've also changed the names of both tests to reflect the changes.

As it was discussed in #6413 the test code should be reworked to be as exact as possible. So essentially my changes got merged to 3.8.x and 3.9.x but got left out in the 4.0.x merge (#6417). This is the initial code with more precise testing as it tests for the added/removed foreign key constraints and not only the count for each of them.

greg0ire commented 4 months ago

Thanks @achterin !