At the Magento Imagine Conference, Magento announced the next noteworthy release on the Magento platform – Magento 2.3. It has enormous features, back-end enhancements, and optimizations.

So I just wonder that What is the actual use of Declarative DB Schema and how it's overcome on Traditional way to install/upgrade table and update its fields in Magento2.3.

2 Answers 2


Declarative schema makes it easy to install and update Magento versions. Prior to now, each time developers needed to compose database scripts in PHP for the new version of Magento. For example, in the current version of Magento, you can change the pattern of a Magento database by composing code with UpgradeSchema and InstallSchema. However, with the new Magento 2.3, you can impact changes by utilizing a declarative database schema. This way, you can undoubtedly delete data when you uninstall a module.

you can use this link as a reference for more details on which new features in Magento 2.3.



Magento includes this feature in its Magento2.3 version. It simplifies the Magento’s installation and upgrade processes.

Previously we had to write the database script for each version of the module. Various scripts were required for different operations on the database.

Declarative schema helps Magento to simplify module upgradation procedures. Natively each upgrade scripts iteratively adds changes to database blindly. Declarative Schema setup is based on database structure declarations.

Declarative Schema files declare what the database structure should be, and Magento determines the differences between the current table structure and what it should be.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.