What is the main usage of db_schema_whitelist.json file ?

3 Answers 3


In the simple term: "db_schema_whitelist.json file is a history of all tables, columns, and keys added with the declarative schema."

With the release of Magento 2.3 Declarative Schema files declare what the database structure should be.

For more understanding go to this link.



Magento 2 versions from 2.3 have a replacement for traditional install/upgrade schema which is used to maintain the database structure.

From Magento 2 version 2.3, they have introduced the declarative schema file for database (etc/db_schema.xml) which is used to maintain the database structure for a module. https://devdocs.magento.com/guides/v2.3/extension-dev-guide/declarative-schema/db-schema.html


The db_schema_whitelist. json file is a way of telling Magento which tables and columns it can safely alter using the db_schema. xml file. It was added to preserve backward compatibility and will be removed in a future version when the install/upgrade script be no longer supported.


Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.