Closed captain-melanie closed 2 years ago
Hi @captain-melanie , I've installed module-shipper version 20.25.0 (the version with setup_version v1.1.21) to a fresh instance of Magento 2.4.3, and then upgraded via the process outlined in our install docs, and did not encounter this issue.
If you'd like to troubleshoot this further, can you please send details of your environment including Magento version and PHP version to support@shipperhq.com? Thanks,
Same issue for me. I think it is related to the MySQL version.
@wsadasmit can you test it using MySQL 5.7 or higher?
Issue has been replicated. Thanks for the PR @captain-melanie
Thanks for raising this issue. We'll be creating a new release shortly which addresses it. Thanks for the fix @captain-melanie !
Hi, we have setup_version v1.1.21 installed and would like to upgrade to setup_version v1.1.26, but a sql error in the upgrade script broke the whole process. You could reproduce the error by upgrading v1.1.21 to v1.1.26.
In log:
We found that the error comes from this line https://github.com/shipperhq/module-shipper/blob/main/src/Setup/UpgradeSchema.php#L990 where the script tries to drop an index but fails due to a foreign key constraint in MySQL https://dev.mysql.com/doc/refman/8.0/en/create-table-foreign-keys.html. MySQL requires at least 1 index on foreign key. This constraint is consistent across MySQL versions.
To fix this issue, we could add a temporary index to satisfy the constraint then drop it once the proper index has been added to the table.
pr: https://github.com/shipperhq/module-shipper/pull/100