Skip to content
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

Open
wants to merge 2 commits into
base: 4.1.x
Choose a base branch
from

Conversation

ausi
Copy link
Contributor

@ausi ausi commented Feb 6, 2024

Q A
Type improvement
Fixed issues #6299

Summary

Makes column and index rename detection of the Comparator configurable, as suggested in #6299 (comment)

@@ -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
Copy link
Contributor Author

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)

Copy link
Contributor

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

Copy link
Contributor Author

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?

Copy link
Contributor

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in d0c8602

@ausi ausi force-pushed the feature/rename-columns-configurable branch from b663bfe to d0c8602 Compare March 11, 2024 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants