The following function can be added to the file worklow.install to allow the uninstall of the module :
/**
* Implementation of hook_uninstall().
*/
function workflow_uninstall() {
// Drop database table
db_query('DROP TABLE {workflow_states}');
db_query('DROP TABLE {workflow_transitions}');
db_query('DROP TABLE {workflows}');
db_query('DROP TABLE {workflow_type_map}');
db_query('DROP TABLE {workflow_node}');
db_query('DROP TABLE {workflow_actions}');
db_query('DROP TABLE {workflow_node_history}');
db_query('DROP TABLE {workflow_scheduled_transition}');
db_query('DROP TABLE {workflow_node_history}');
// Delete variables
}
and the following one in the file workflow_access.install :
/**
* Implementation of hook_uninstall().
*/
function workflow_access_uninstall() {
// Drop database table
db_query('DROP TABLE {workflow_access}');
// Delete variables
}
Without this, the tables are not deleted even if you uninstall the module
Comments
Comment #1
emdalton CreditAttribution: emdalton commentedI got an error:
user warning: Unknown table 'workflow_node_history' query: DROP TABLE workflow_node_history in /../includes/database.mysql.inc on line 172.
This was after making both changes above and selecting both Workflow and Workflow Access for uninstall.
Comment #2
jvandyk CreditAttribution: jvandyk commentedCommitted with changes to workflow_access to remove entries from node_access table.
Comment #3
jz_ CreditAttribution: jz_ commentedhow do I benefit from this? message from emdalton sounds like if I patch it by myself, I might have a similar error ? is it safe to put those lines in the workflow.install and uninstall ?
Comment #4
adshill CreditAttribution: adshill commentedRe-opening - I added the code to both files, re-uploaded, uninstalled and then deleted the files. I'm still having completely crazy access permission problems. In my case this alone has not solved the problems... any ideas?
Comment #5
adshill CreditAttribution: adshill commentedFor some reason when I re-installed the module and went through the process again, it worked. Apologies - reverting to fixed again.
Comment #6
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.