mollie / magento2

Mollie Payments for Magento 2
https://www.mollie.com
Other
101 stars 53 forks source link

First setup:upgrade fails on AddMollieShipmentIdAttribute patch #822

Open LucaGallinari opened 2 weeks ago

LucaGallinari commented 2 weeks ago

Describe the bug Sometimes, during the first setup:upgrade of the module, the procedure fails while adding the mollie_shipment_id to the sales_shipment table:

Module 'Hyva_Checkout':
Module 'MarkShust_DisableTwoFactorAuth':
Module 'Mollie_Payment':
Enabling caches:
Current status:
layout: 1
block_html: 1
full_page: 1
Unable to apply data patch Mollie\Payment\Setup\Patch\Data\AddMollieShipmentIdAttribute for module Mollie_Payment. Original exception message: DDL statements are not allowed in transactions
  error  in magento2.php on line 302:
exit code 1 (General error)

Theoretically this should always fails as you shouldn't be able to add a column via DataPatch, but sometimes, especially on the second run of the setup:upgrade, it adds the column properly without errors.

Btw, it should be replaced with a proper definition of the column via db_schema file.

Used versions

Frank-Magmodules commented 1 week ago

Hi @LucaGallinari,

Thank you for opening this issue and providing the details. We’ve had the setup scripts integrated into our Continuous Integration workflow for quite some time now, and we’ve never encountered this problem. Could it be that there is a conflict with another module in your setup?