respect to platform restrictions when creating autoincrement identifier name#4106
respect to platform restrictions when creating autoincrement identifier name#4106morozov merged 1 commit intodoctrine:2.10.xfrom karakayasemi:fix-oracle-autoincrement
Conversation
|
Thanks for the contribution, @karakayasemi. Please add a functional test or tweak an existing one that will cover your case on all supported platforms. Looks like it's not tested anywhere. |
|
Since generated names include table name, shortening generated name by cutting its exceeding part from the at the end of the string can result in the same name with the table name. So, I kept the suffix and cut the base string as needed to adjust the length. As you suggest, a functional test that covers the max identifier length case has been added. @morozov please review once more. Thank you. |
morozov
left a comment
There was a problem hiding this comment.
Looks good for the most part, just needs some cleanup 👍
tests/Doctrine/Tests/DBAL/Functional/Platform/PlatformRestrictionsTest.php
Outdated
Show resolved
Hide resolved
tests/Doctrine/Tests/DBAL/Functional/Platform/PlatformRestrictionsTest.php
Outdated
Show resolved
Hide resolved
|
@morozov it is ready for review again. Thank you for your help. |
|
Looks good. Please revert the irrelevant changes and squash. |
|
@morozov the irrelevant change has been reverted and commits have been squashed. |
|
Thanks, @karakayasemi! |
Summary
OraclePlatformdoes not respect to 30 character max element name restriction ingetAutoincrementIdentifierNamemethod. This situation leads toORA-00972: identifier is too longerror in Oracle databases like here owncloud/twofactor_totp#140 (comment). This PR aims to fix this bug.