2

I was playing on Magento 2.3 with Declarative Schema, and everything works very well when I added a new column do db_schema.xml and did a setup:upgrade.

However, when removing a column node from XML and performing setup:upgrade, the column was not removed.

I also tried with --safe-mode=0, adding disabled="true", flushing cache before, etc, but the column is still there.

Am I missing something?

3

You have to regenerate whitelist for your module every time you delete something in your db_schema.xml

Reference: https://devdocs.magento.com/guides/v2.3/extension-dev-guide/declarative-schema/migration-commands.html#create-whitelist

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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