Skip to content

Make VaultMigration compatible with disabled/removed Magento PayPal module#2806

Merged
candemiralp merged 12 commits intoAdyen:develop-10from
fahu:bugfix/FAHU/make-vault-migration-compatible-with-disabled-paypal-module
May 15, 2025
Merged

Make VaultMigration compatible with disabled/removed Magento PayPal module#2806
candemiralp merged 12 commits intoAdyen:develop-10from
fahu:bugfix/FAHU/make-vault-migration-compatible-with-disabled-paypal-module

Conversation

@fahu
Copy link
Contributor

@fahu fahu commented Nov 18, 2024

Issue
The installation/upgrade of the Adyen Payment plugin fails with the following error:

Column not found: 1054 Unknown column 'method_code' in 'where clause', query was: SELECT `paypal_billing_agreement`.* FROM `paypal_billing_agreement` WHERE (method_code = 'adyen_oneclick') AND (status = 'active')

Cause
The Adyen Payment module re-creates the table during migration by adding the agreement_data field (via db_schema.xml). However, when attempting to migrate the billing agreements to the vault, the process fails to query the table using the method_code and status because these fields do not exist in the table.

Solution
Ensure VaultMigration does not fail if the paypal_billing_agreement table is missing or required fields are missing.

…odule

**Issue**
The installation/upgrade of the Adyen Payment plugin fails with the following error:
```
Column not found: 1054 Unknown column 'method_code' in 'where clause', query was: SELECT `paypal_billing_agreement`.* FROM `paypal_billing_agreement` WHERE (method_code = 'adyen_oneclick') AND (status = 'active')
```

**Cause**
The Adyen Payment module re-creates the table during migration by adding the agreement_data field (via db_schema.xml).
However, when attempting to migrate the billing agreements to the vault, the process fails to query the table using
the `method_code` and `status` because these fields do not exist in the table.

**Solution**
Ensure VaultMigration does not fail if the `paypal_billing_agreement` table is missing or required fields are missing.
@candemiralp
Copy link
Contributor

Hello @fahu,

Thank you for your contribution and providing a fix for token migration issue. We will review and merge this PR if there is no issue.

Best Regards,
Can

candemiralp
candemiralp previously approved these changes Feb 25, 2025
…-compatible-with-disabled-paypal-module' into bugfix/FAHU/make-vault-migration-compatible-with-disabled-paypal-module
@candemiralp candemiralp merged commit 5500c20 into Adyen:develop-10 May 15, 2025
0 of 5 checks passed
@candemiralp
Copy link
Contributor

Dear @fahu,

Once again, thank you for your contribution. This PR has been merged to V10 feature branch and will be released as a part of our next major version.

Best Regards,
Can

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Fix Indicates a bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants