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

emdalton’s picture

I 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.

jvandyk’s picture

Status: Needs work » Fixed

Committed with changes to workflow_access to remove entries from node_access table.

jz_’s picture

how 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 ?

adshill’s picture

Status: Fixed » Active

Re-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?

adshill’s picture

Status: Active » Fixed

For some reason when I re-installed the module and went through the process again, it worked. Apologies - reverting to fixed again.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.