You are here

function state_flow_update_7001 in State Machine 7

Same name and namespace in other branches
  1. 7.2 modules/state_flow/state_flow.install \state_flow_update_7001()

Implements hook_update_N().

Create a new node_revision_states_history table to track state changes. Also, add an index for 'nid' to the node_revision_states table.

File

modules/state_flow/state_flow.install, line 62
Install file for the State Flow module.

Code

function state_flow_update_7001() {
  $new_table = drupal_get_schema_unprocessed('state_flow', 'node_revision_states_history');
  db_create_table('node_revision_states_history', $new_table);
  db_add_index('node_revision_states', 'nid', array(
    'nid',
  ));
  return t('Created a new {node_revision_states_history} table.');
}