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.

dotancohen
1,1306 silver badges21 bronze badges
asked Apr 23, 2015 at 10:12

1 Answer 1

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.

answered Jul 17, 2015 at 10:48

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.