Magento 2 How to create table and field using db_schema.xml

 In Magento blog

In this blog, we’re going to show you how to use the db_schema.xml file to create a new database table.

Once you Create file db_schema.xml in this directory app/code/VName/MName/etc. We will create a table named  table_name”.

After will running the below command :

  • php bin/magento setup:upgrade

As you run the upgrade command, a new database table will be created in your database.

If you have any questions let me know in the comment section.

Thank you!

Leave a Comment


0