How to add column in sales_order table using db_schema.xml Magento 2?

You can add a new column in sales_order table using db_schema.xml under your module etc folder from Magento 2.3 and Upper version.

We try to add a new column called order_country in sales_order table.

To add order_country field in sales_order table, you need to only add one row inside the db_schema.xml file structure.

Here, the Main table for Sales Operation is sales_order and you can add a new field in sales_order table by the below way, Continue reading “How to add column in sales_order table using db_schema.xml Magento 2?”