-
Notifications
You must be signed in to change notification settings - Fork 9.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
The unsigned
flag is not recognized on schema parsing and comparison on MySQL 8.0.30
#36558
Comments
Hi @speller. Thank you for your report.
Make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:
For more details, review the Magento Contributor Assistant documentation. Add a comment to assign the issue: To learn more about issue processing workflow, refer to the Code Contributions.
🕙 You can find the schedule on the Magento Community Calendar page. 📞 The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket. ✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel |
As a workaround, I'm using the following patch with the --- a/Setup/Declaration/Schema/Dto/ElementFactory.php
+++ b/Setup/Declaration/Schema/Dto/ElementFactory.php
@@ -60,6 +60,11 @@
{
$booleanAttributes = ['nullable', 'unsigned', 'identity'];
+ if (isset($elementStructuralData['definition']) && strpos($elementStructuralData['definition'], ' unsigned') > 0)
+ {
+ $elementStructuralData['unsigned'] = true;
+ }
+
foreach ($booleanAttributes as $booleanAttribute) {
if (isset($elementStructuralData[$booleanAttribute])) {
$elementStructuralData[$booleanAttribute] = $this->booleanUtils |
Hi @engcom-Hotel. Thank you for working on this issue.
|
Hello @speller, We have tried to reproduce the issue in Magento 2.4-develop branch but the issue is not reproducible for us. We are able to run the below command after creating the custom module for table creation:
The definition of the
We can see the table is created with the given definition above: Please let us know if we have missed anything. Thanks |
@engcom-Hotel does the |
Hello @speller, Thanks for the reply! We have checked the output of But I have we have checked the I think there is an issue related to this here which is confirmed #35671. Thanks |
@engcom-Hotel as I described in the ticket, this issue exists in my setup in addition to #35671. |
Yes @speller, By using the above
Thanks |
Dear @speller, We have noticed that this issue has not been updated for a period of 14 Days. Hence we assume that this issue is fixed now, so we are closing it. Please raise a fresh ticket or reopen this ticket if you need more assistance on this. Regards |
@engcom-Hotel you don't have the |
Hello @speller, It has an unsigned flag. You can see this in the definition here at the #36558 (comment). Thanks |
@engcom-Hotel no, the flag is in the |
Preconditions and environment
Steps to reproduce
Sample table
See the
yotpo_id
field definition.Sample Magento definition:
Expected result
Magento successfully syncs database and declarative schema
Actual result
Magento doesn't recognize the
unsigned
flag.Thus, the declarative schema is ALWAYS not up-to-date.
Additional information
The
Magento\Framework\Setup\Declaration\Schema\Db\MySQL\DbSchemaReader::readColumns()
method gets the following data for theyotpo_id
field:And then, since the
\Magento\Framework\Setup\Declaration\Schema\Dto\ElementFactory::castGenericAttributes()
expects theunsigned
flag to be a separate array value, theunsigned
flag is never detected and set properly:The
\Magento\Framework\ObjectManager\Factory\AbstractFactory::getResolvedArgument()
method expects theunsigned
flag to be in the array. If not, it picks the defaultfalse
value:Release note
No response
Triage and priority
The text was updated successfully, but these errors were encountered: