Open peterjaap opened 11 months ago
This email address should be saved in a customer attribute through EAV, not a separate column.
We already have something internally for this, so I can supply a PR with most of the groundwork on the backend side. Let me know.
First of all; amazing work and thanks for open-sourcing this!
Best practice is to not add columns to sales order or quote table. These tables (espeically the quote table) generally hold A LOT of records and it brings the shop down for sometimes hours when adding the column during deployment because MySQL is terribly inefficient at adding columns to tables with existing data. Better would be to create a new pivot table for this data so we can do blue/green deployments.
So for how to do this this excellent blog; https://m.academy/blog/programmatically-add-column-magento-2-sales-order-database-table/