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

Column with schemaDefinition equal to existing column in db keeps generating diff #5869

Closed
wants to merge 2 commits into from

Conversation

janedbal
Copy link
Contributor

Q A
Type bug
Fixed issues 0

Summary

For some reason, AbstractPlatform is dropping columnDefinition when comparing columns. That causes issues of useless diffs being generated as shown in the failing test. Removing those two lines fixes this issue.


The real usecase I'm meeting is that our doctrine entity has discriminator column that needs manual setup of charset and collation and DiscriminatorColumn does not support the same options as regular Column (to provide charset and collation). With this bug, doctrine migrations keep generating new versions with no change inside.

@janedbal
Copy link
Contributor Author

Worth to mention, that the testcase passes when you use old (deprecated) comparator approach

$comparator = new Comparator();
// instead of
$comparator = $this->schemaManager->createComparator();

Which is the way I detected this issue.

@janedbal
Copy link
Contributor Author

janedbal commented Feb 3, 2023

@derrabus Would you accept PR with removal of those two lines? It looks like it breaks only 2 tests that test only that extact two lines and I dont really see reason to have it there.

@derrabus
Copy link
Member

derrabus commented Feb 3, 2023

Those were added in #5224. Maybe that helps understanding the motivation behind them.

@janedbal
Copy link
Contributor Author

janedbal commented Feb 3, 2023

Hm, that is really tricky. So my only saviour is probably this...

@derrabus derrabus changed the base branch from 3.5.x to 3.6.x February 7, 2023 23:08
@morozov
Copy link
Member

morozov commented Mar 18, 2023

Those were added in #5224. Maybe that helps understanding the motivation behind them.

See #3647 (comment).

@github-actions
Copy link

There hasn't been any activity on this pull request in the past 90 days, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 7 days.
If you want to continue working on it, please leave a comment.

@github-actions github-actions bot added the Stale label Jun 17, 2023
@github-actions
Copy link

This pull request was closed due to inactivity.

@github-actions github-actions bot closed this Jun 24, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants