Question

So, I read that Magento 2.3 will be introducing Declarative Database Schema.

Today, when you want to alter the schema of a Magento database, the pattern used to accomplish this is to use the InstallSchema and UpgradeSchema classes where code is written to alter the schema. Magento 2.3 will change the recommended way by implementing a declarative database schema.

Please, could someone help explain what this means and why it's so beneficial. And is this referring to changes to the DB itself or just the scripts used to install and upgrade.

Thanks.

Was it helpful?

Solution

I'm going to attempt to answer my own question here based on a post I just read here.

From what I understand... Right now, when a module is developed for Magento 2 it has to be written in a way that can easily invite bugs and complexity.

Common issues include:

  • Having different types of scripts makes the system unstable and difficult
  • Excessive complexity of installation
  • There is no update validation

The upcoming update will allow developers to restructure parts of their modules so that it can be written much clearer.

Potential solutions include

  • Avoids missed or repeated SQL operations
  • Performance improvements
  • Ability to revert to a previous version

This will result in a reduction of potential bugs, easier development and performance improvements.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top