Follow Bellow Steps To Add a column in quote_payment table In Magento2 :
👉 Create a file db_schema.xml file in Vendor\Extension\etc\db_schema.xml Folder :
I'm added a new column paymentpocomment in sales_order_payment table using db_schema :
<?xml version="1.0"?>
<schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:Setup/Declaration/Schema/etc/schema.xsd">
<table name="quote_payment" resource="checkout" engine="innodb" comment="Sales Flat Quote Payment">
<column xsi:type="text" name="paymentpocomment" nullable="true" comment="PO Comment"/>
</table>
</schema>
👉 After Done Above Code then Run Bellow Command -
- php bin/magento setup:upgrade
- php bin/magento setup:static-content:deploy -f
- php bin/magento cache:flush
👉 and check your quote_payment Databse table : your column is here