QuestionQ11
Working with Databases and EAVAn Adobe Commerce developer has built a module that adds a product attribute to every product type through a Data Patch.
According to best practices, how should the developer ensure that this product attribute is removed if the module is later uninstalled?
- A Add an Uninstall.php file extending \Magento\Framework\Setup\UninstallInterface to the module's setup directory and implement the uninstall method.
- B Add instructions to the module's README.md file instructing merchants and developers that they must manually remove this attribute if they want to uninstall the module.
- C Make the Data Patch implement \Magento\Framework\Setup\Patch\PatchRevertableInterface and implement the revert method to remove the product attribute.
Community Discussion