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
Make column and index renaming configurable #6300
base: 4.1.x
Are you sure you want to change the base?
Conversation
src/Platforms/MySQL/Comparator.php
Outdated
@@ -30,11 +31,12 @@ public function __construct( | |||
parent::__construct($platform); | |||
} | |||
|
|||
public function compareTables(Table $oldTable, Table $newTable): TableDiff | |||
public function compareTables(Table $oldTable, Table $newTable, ?ComparatorConfig $config = null): TableDiff |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this considered to be a BC break?
If so, should I use func_get_arg()
or a setConfig()
method instead?
(I’d not be a fan of a setConfig()
method as this would introduce state to the Comparator)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I mentioned in the issue, Comparator is indeed an extensible class, so changing the public signature is a breaking change, though likely a very low impact one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, should I add a setConfig()
method to the Comparator
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be best yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in d0c8602
b663bfe
to
d0c8602
Compare
Summary
Makes column and index rename detection of the
Comparator
configurable, as suggested in #6299 (comment)