function workflow_update_5 in Workflow 5
Same name and namespace in other branches
- 5.2 workflow.install \workflow_update_5()
- 6.2 workflow.install \workflow_update_5()
- 6 workflow.install \workflow_update_5()
File
- ./
workflow.install, line 368
Code
function workflow_update_5() {
$ret[] = update_sql("ALTER TABLE {workflow_node} ADD stamp int(10) unsigned AFTER uid");
$sql = "SELECT MAX(stamp) AS stamp, nid FROM {workflow_node_history} GROUP BY nid";
$result = db_query($sql);
while ($row = db_fetch_object($result)) {
$ret[] = update_sql("UPDATE {workflow_node} SET stamp = {$row->stamp} WHERE nid = {$row->nid}");
}
return $ret;
}