You are here

function msnf_schema in Multistep Nodeform 7

Same name and namespace in other branches
  1. 6 msnf.install \msnf_schema()

Implements hook_schema().

Defines the database schema for module "Multistep Nodeform".

File

./msnf.install, line 33
Installation routines for module "Multistep Nodeform".

Code

function msnf_schema() {
  $schema['msnf_step'] = array(
    'description' => 'Table that contains step entries and settings from module msnf.',
    // CTools export definitions.
    'export' => array(
      'key' => 'identifier',
      'identifier' => 'msnf',
      'default hook' => 'msnf_step_info',
      'save callback' => 'msnf_step_save',
      'delete callback' => 'msnf_step_export_delete',
      'can disable' => TRUE,
      'api' => array(
        'owner' => 'msnf',
        'api' => 'msnf',
        'minimum_version' => 1,
        'current_version' => 1,
      ),
    ),
    'fields' => array(
      'id' => array(
        'type' => 'serial',
        'not null' => TRUE,
        'description' => 'The primary identifier for a form step.',
        'no export' => TRUE,
      ),
      'identifier' => array(
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '',
        'description' => 'The unique string identifier for a form step.',
      ),
      'step_name' => array(
        'type' => 'varchar',
        'length' => 32,
        'not null' => TRUE,
        'default' => '',
        'description' => 'The name of this form step.',
      ),
      'entity_type' => array(
        'type' => 'varchar',
        'length' => 32,
        'not null' => TRUE,
        'default' => '',
      ),
      'bundle' => array(
        'type' => 'varchar',
        'length' => 128,
        'not null' => TRUE,
        'default' => '',
      ),
      'data' => array(
        'type' => 'blob',
        'size' => 'big',
        'not null' => TRUE,
        'serialize' => TRUE,
        'description' => 'Serialized data containing the form step properties that do not warrant a dedicated column.',
      ),
    ),
    'primary key' => array(
      'id',
    ),
    'indexes' => array(
      'step_name' => array(
        'step_name',
      ),
    ),
    'unique keys' => array(
      'identifier' => array(
        'identifier',
      ),
    ),
  );
  return $schema;
}