How to create a custom field in the table.?

create a XML file Vendor/Module/etc/db_schema.xml

mention the table tame and the field.

<?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="customer_entity">
        <column xsi:type="date" name="customer_agreement_end_date" comment="End date of the agreement"/>
    </table>
</schema>

Leave a comment

Your email address will not be published. Required fields are marked *