Question

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?

Was it helpful?

Solution

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

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