How to create a new database table using declarative schema in Magento 2.3?

From Magento 2.3, use  db_schema.xml  to create a new table for the database instead of written InstallSchema PHP class. The new database table creation/updating concept in Magento 2.3 is called declarative schema.

From Magento 2.3 You don’t need to create InstallSchema.php and UpgradeSchema.php

6 Replies to “How to create a new database table using declarative schema in Magento 2.3?”

  1. Wow!

    Thanks for update. its really good article, in the previous version we have to create install schema and upgrade. This will make to light for developers to create tables for custom requirements.

    thank you rakesh.

  2. Hello, Rakesh sir again awesome content I wish a blog to compare between both 2.2.x schema and 2.3.x schema.
    like why this new style of creating a schema is adopted by Magento guys
    thanks again, master.

  3. Wow!

    Thanks for update. its really good article, in the previous version we have to create install schema and upgrade. This will make to light for developers to create tables for custom requirements.

    thank you rakesh.

  4. Hello, Rakesh sir again awesome content I wish a blog to compare between both 2.2.x schema and 2.3.x schema.
    like why this new style of creating a schema is adopted by Magento guys
    thanks again, master.

Leave a Reply