You are here

function state_flow_schema in State Machine 6

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

Implementation of hook_schema().

File

modules/state_flow/state_flow.install, line 24
Install file for the state flow module.

Code

function state_flow_schema() {
  $schema['node_revision_states'] = array(
    'description' => t('Saves the current live vid of a node'),
    'fields' => array(
      'vid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'nid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'state' => array(
        'type' => 'varchar',
        'length' => '255',
        'not null' => FALSE,
      ),
      'status' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'timestamp' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null',
        TRUE,
        'default' => 0,
      ),
    ),
    'primary key' => array(
      'vid',
    ),
  );
  return $schema;
}