You are here

function heartbeat_plugins_schema in Heartbeat 7

Implements hook_schema().

File

modules/heartbeat_plugins/heartbeat_plugins.install, line 17
Install file.

Code

function heartbeat_plugins_schema() {
  $schema['heartbeat_plugins'] = array(
    'description' => 'The base table for heartbeat plugins.',
    // CTools export definitions.
    'export' => array(
      'key' => 'plugin_name',
      'identifier' => 'plugin_name',
      'object' => 'HeartbeatPluginWrapper',
      'default hook' => 'heartbeat_plugin_info',
      'delete callback' => 'heartbeat_plugins_delete',
      'can disable' => TRUE,
      'api' => array(
        'owner' => 'heartbeat_plugins',
        'api' => 'heartbeat_plugins',
        'minimum_version' => 1,
        'current_version' => 1,
      ),
    ),
    'fields' => array(
      'plugin_name' => array(
        'description' => 'The primary identifier for the heartbeat plugin.',
        'type' => 'varchar',
        'length' => 64,
        'not null' => TRUE,
        'default' => '',
      ),
      'label' => array(
        'description' => 'The label for the heartbeat plugin.',
        'type' => 'varchar',
        'length' => 64,
        'not null' => TRUE,
        'default' => '',
      ),
      'module' => array(
        'description' => 'The module for the heartbeat plugin.',
        'type' => 'varchar',
        'length' => 64,
        'not null' => TRUE,
        'default' => '',
      ),
      'settings' => array(
        'description' => t('Settings for the plugin.'),
        'type' => 'blob',
        'serialize' => TRUE,
        'not null' => TRUE,
      ),
    ),
    'primary key' => array(
      'plugin_name',
    ),
  );
  return $schema;
}