2

I've created my own module and generated a package mymodule.tgz. When I install extension in MagentoConnect (by Direct package file upload) everything works fine. The problem occurs when I want to completely remove the module. When I click "uninstall" in MagentoConnect all files of module are deleted but sql tables are still present in database. That is why I have 2 questions:

  1. Is it possible to remove sql tables created by module when uninstall method is executed by php script?

  2. Is it possible to remove only some certain files of module when uninstall method is executed by php script?

Second question concerns the problem of images folder which is created by module. I don't want to delete this files when it's uninstalled because when the user installs extension once again, he should have those files visible.

2

Is it possible to remove sql tabales created by module when uninstall method is executed by php script?

No it is not. Magento implements some kind of uninstall thingy, but the problem is, that if you delete the files (which is the definition of uninstall in magento universe), what file should trigger the cleanup?

Is it possible to remove only some certain files of module when uninstall method is executed by php script?

No clue how connect does this, but I would assume what is in package.xml get installed and removed.

On a hackathon a team implemented MageTrashApp which should solve this problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.