-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
MySQLSchemaManager: Check expected database type for json columns only #6189
Conversation
Using the type from DC2Type comments masks the need to upgrade LONGTEXT columns to JSON so the underlying column type was also checked for commented columns. Custom column types using a valid synonym for column type (e.g. NUMERIC for DECIMAL), trigger a false failure of this type test. Restrict the check to json types only. Add test case. See bug doctrine#6185.
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.
Should fix my issue, I will test it next week.
*/ | ||
public function getMappedDatabaseTypes(AbstractPlatform $platform) | ||
{ | ||
return ['point']; |
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 meant to be here?
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.
Oops. No. Thanks for spotting. Now removed.
Remove getMappedDatabaseTypes() method included by mistake.
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.
Tested - fixes the bug I filed.
Thank you. |
* 3.8.x: Run tests on MySQL 8.2 (doctrine#6207) MySQLSchemaManager. Check expected database type for json columns only. (doctrine#6189) Make the type annotation for CompositeExpression::count more specific (doctrine#6188)
* 3.8.x: Run tests on MySQL 8.2 (doctrine#6207) MySQLSchemaManager. Check expected database type for json columns only. (doctrine#6189) Make the type annotation for CompositeExpression::count more specific (doctrine#6188)
| Q | A |------------- | ----------- | Type | improvement | Fixed issues | Follows #6189 #### Summary This PR improves the test added in #6189 by allowing it to run on other platforms than MySQL/MariaDB and by using non-deprecated APIs only. This should make it easier to merge this test and later changes to it up to the 4.0.x branch. I've skipped Oracle though because I currently don't have a local Oracle setup to test against.
* 3.8.x: Generalize CustomIntrospectionTest (doctrine#6210) Run tests on MySQL 8.2 (doctrine#6207) MySQLSchemaManager. Check expected database type for json columns only. (doctrine#6189) Make the type annotation for CompositeExpression::count more specific (doctrine#6188)
…y. (doctrine#6189) | Q | A |------------- | ----------- | Type | bug fix | Fixed issues | doctrine#6185 #### Summary Using the type from DC2Type comments masks the need to upgrade LONGTEXT columns to JSON so the underlying column type was also checked for commented columns. Custom column types using a valid synonym for column type (e.g. NUMERIC for DECIMAL), trigger a false failure of this type test. Restrict the check to json types only and add test case.
| Q | A |------------- | ----------- | Type | improvement | Fixed issues | Follows doctrine#6189 #### Summary This PR improves the test added in doctrine#6189 by allowing it to run on other platforms than MySQL/MariaDB and by using non-deprecated APIs only. This should make it easier to merge this test and later changes to it up to the 4.0.x branch. I've skipped Oracle though because I currently don't have a local Oracle setup to test against.
Thank you @cgknx |
Summary
Using the type from DC2Type comments masks the need to upgrade LONGTEXT columns to JSON so the underlying column type was also checked for commented columns.
Custom column types using a valid synonym for column type (e.g. NUMERIC for DECIMAL), trigger a false failure of this type test.
Restrict the check to json types only and add test case.