Commit 5500c20
Make VaultMigration compatible with disabled/removed Magento PayPal module (#2806)
* Make VaultMigration compatible with disabled/removed Magento PayPal module
**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.
* Use getTableName() method to obtain the full table name containing table prefix
* Revert "Use getTableName() method to obtain the full table name containing table prefix"
This reverts commit e59cbbc.
* Drop `paypal_billing_agreement.agreement_data` declaration
* Bump MariaDB version
* Use connection to check the existence of the table
---------
Co-authored-by: Fabian Hurnaus <fabian.hurnaus@tractive.com>
Co-authored-by: Can Demiralp <ecandemiralp@gmail.com>
Co-authored-by: Can Demiralp <can.demiralp@adyen.com>1 parent 9056277 commit 5500c20
File tree
3 files changed
+12
-4
lines changed- .github
- Setup/Patch/Data
- etc
3 files changed
+12
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
59 | 70 | | |
60 | 71 | | |
61 | 72 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | 12 | | |
16 | 13 | | |
17 | 14 | | |
| |||
0 commit comments