Patches are not removed after the module uninstallation #2170
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Preconditions (*)
Tested in this versions:
Issue Description (*)
As per standard rule of magento, whenever we uninstall the module, all the database tables and data patches associated with that module should be removed. However, in this module after uninstalling the module, I can see that only database tables are removed, the data patches associated with the module are not removed.
Steps to reproduce (*)
Screenshot-1
Expected result (*)
The data patches should be removed along with the database tables from the database during module uninstallation.
Actual result (*)
The data patches were not removed along with the database tables from the database during module uninstallation.
Additional Information (*)
This behavior occurs due to the failure of data patches to revert correctly when the module is uninstalled. It happens because the revert method has not been implemented in the following files. Once you add the revert method then the issue will be resolved.
File Names (*)
1.mailchimp/mc-magento2/Setup/Patch/Data/Migrate24.php
2.mailchimp/mc-magento2/Setup/Patch/Data/Migrate32.php
3.mailchimp/mc-magento2/Setup/Patch/Data/Migrate35.php