function workflow_update_5204 in Workflow 6.2
Same name and namespace in other branches
- 5.2 workflow.install \workflow_update_5204()
- 6 workflow.install \workflow_update_5204()
File
- ./
workflow.install, line 364
Code
function workflow_update_5204() {
$ret = array();
switch ($GLOBALS['db_type']) {
case 'mysqli':
case 'mysql':
$ret[] = update_sql("ALTER TABLE {workflow_transitions} CHANGE roles roles VARCHAR(255) NULL DEFAULT NULL");
break;
case 'pgsql':
$ret[] = update_sql("BEGIN;\n ALTER TABLE {workflow_transitions} ADD COLUMN roles_temp VARCHAR(255);\n UPDATE roles_temp SET new_col = CAST(roles AS VARCHAR(255));\n ALTER TABLE {actions_assignments} DROP COLUMN roles;\n RENAME roles_temp TO roles;\n COMMIT;");
break;
}
return $ret;
}