Adyen / adyen-shopware6

Adyen Payment plugin for Shopware 6
MIT License
21 stars 21 forks source link

[ECP-9345]MySQL 8.4 - Migrations/Structure not compatible e.g. invalid foreign keys due to missing version (3.x for Shopware 6.5.x and 4.x for Shopware 6.6.x) #520

Open AndreasA opened 1 month ago

AndreasA commented 1 month ago

Describe the bug With MySQL 8.4 it is necessary for a foreign key to contain all fields of a composite primary key (without changing global settings).

Therefore, e.g. the migration https://github.com/Adyen/adyen-shopware6/blob/3.15.0/src/Migration/Migration1669129247AdyenPayment.php fails as it creates a foreign key to order transaction without the version_id

Versions Shopware version: 6.5.8.12 / 6.6 Plugin version: 3.15.0

To Reproduce Steps to reproduce the behavior:

  1. Install MySQL 8.4
  2. Fail to execute migrations upon installation due to invalid foreign keys.

Expected behavior It should be able to execute the migrations correctly. Using the full key makes sense anyway.

However, it is necessary to fix the original migration (new installations) and add another migration to fix existing installations.

There is also a MySQL issue regarding this https://bugs.mysql.com/bug.php?id=114882 but it will probably stay as is and the docu will be adjusted.

khushboo-singhvi commented 1 month ago

Hello @AndreasA,

Thank you for bringing this to our attention.

We have created an internal ticket to investigate the scenario you mentioned. Our team is looking into it, and we will provide an update as soon as we have more information.

Thank you for your patience.

Best regards, Khushboo Singhvi