mollie / magento2

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

Use pivot tables instead of adding columns #663

Closed michielgerritsen closed 12 months ago

michielgerritsen commented 12 months ago

Right now we add several columns to different kinds of tables:

quote:
- Payment fee columns

quote_address:
- Payment fee columns

sales_order
- mollie_transaction_id
- Payment fee columns

sales_shipment
- mollie_shipment_id

sales_invoice
- Payment fee columns

sales_creditmemo
- Payment fee columns

When doing these kinds of migrations against big databases, this can cause long downtime. We need to investigate if we can move from columns to pivot tables, as they don't have this problem.

For the payment fee columns I don't see a big issue with this, this is more with the mollie_transaction_id that is being wildly used where I can see that it could give some errors.

When we do this, I would expect a major version bump to let people know something big has changed.