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:
Is it possible to remove sql tables created by module when uninstall method is executed by php script?
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.