It should look something like this:
/**
* Update path aliases for taxonomy terms and nodes.
*/
function gateway_controller_update_7057() {
module_load_include('inc', 'pathauto');
module_load_include('inc', 'pathauto.pathauto');
// Delete the existing node aliases.
db_delete('url_alias')
->condition('source', 'node/%', 'LIKE')
->execute();
// Regenerate the node aliases.
$nids = db_query("SELECT nid FROM {node}")->fetchCol();
pathauto_node_update_alias_multiple($nids, 'bulkupdate');
// Delete the topics taxonomy aliases.
db_delete('url_alias')
->condition('source', 'taxonomy/term/%', 'LIKE')
->execute();
// Regenerate the taxonomy aliases.
$tids = db_query("SELECT tid FROM {taxonomy_term_data} where vid = 8")->fetchCol();
pathauto_taxonomy_term_update_alias_multiple($tids, 'bulkupdate');
}
