Skip to content
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

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants