Hello,
When a transport packages is uninstalled (all versions) and the package is removed (forced if you will)
shouldn’t the tables be removed as well?
If so, how do I accomplish this? If not, why not?
You can do this by implementing a resolver for your transport package. Within your resolver you can check if $options[xPDOTransport::PACKAGE_ACTION] is set to xPDOTransport::ACTION_UNINSTALL
http://rtfm.modx.com/display/revolution20/Creating+a+3rd+Party+Component+Build+Script#Creatinga3rdPartyComponentBuildScript-PackageAttributes%3ALicense%2CReadmeandSetupOptions may help you.
Cheers,
Jakob
Add-On to easily manage your multilingual sites:
Babel
Note: if you add a drop tables part to the uninstall of a resolver in your package, if people try to ’revert to a prior version’ of your script, it will drop the tables.
shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect |
github |
splittingred.com
Okay, it has a great up and downside then...currently when uninstalling VisionCart
and reinstalling it it generates a little error concerning this matter.
I think I have it fixed though and I think we shouldn’t drop the tables after all...
We wouldn’t want a few hundred products to be removed after a downgrade
Thanks again.