QuestionQ17

EAV/Database

A developer created a new table in db.schema.xml while developing a new module.

What must be done to permit database columns to be removed when they are deleted from db_schema.xml?

  • A The removable columns should be defined in db_schema_whitelist.json.
  • B The columns should have "removable" attribute set to "true" in the db.schema.xml.
  • C The removable columns should be defined in db_schema_blacklist.json.
Explanation

Magento declarative schema protects destructive database operations. A column removed from db_schema.xml is dropped only when it is listed in the module’s db_schema_whitelist.json, which is typically generated with setup:db-declaration:generate-whitelist.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!