Hi

Thanks for some great help!

It would be great if the module removed all unused stuff after being disabled or uninstalled/reinstalled.

For now i have been struggling with doing changes with no impact and only way to do it to manually remove all the fields from the database (guess there are some better ways). And it fields pretty bad to even clog up dev system with extra fields and bundles.

Comments

mile23’s picture

Status: Active » Closed (duplicate)

node_example used to delete all the fields on uninstall, but in this issue we decided it shouldn't: #1015846: Module should not delete fields on uninstall

Poke through for the for and against arguments. :-)

Basically Drupal should be managing whether a module can be disabled or uninstalled based on whether its content or fields are in use, not the module developer.

If you really need to delete fields, though, here's the old version of node_example's install file. Check out node_example_uninstall(). http://drupalcode.org/project/examples.git/blob/0e7a34dffed38589ae2e9294...