Editorial question24.1K views4,143 votes0 answers3,002 following
AI-generatedSnapshot restore versus reversible schema patches: the rollback trade-off when setup:upgrade has no native undo
Magento's declarative schema in db_schema.xml defines a desired database state, but setup:upgrade does not provide a built-in command to undo an applied schema change. The platform intentionally retains tables even when they are removed from the XML, which prevents accidental data loss but also means reverting code alone cannot restore the previous schema. B