You are here

function values_schema in Values 7

Same name and namespace in other branches
  1. 6 values.install \values_schema()

Implements hook_schema().

File

./values.install, line 11
Install file for Values module.

Code

function values_schema() {
  $schema['values_sets'] = array(
    'description' => 'List of configured value sets.',
    'export' => array(
      'key' => 'name',
      'identifier' => 'values',
      'default hook' => 'default_values_values',
      'load callback' => 'values_load',
      'load all callback' => 'values_load_all',
      'save callback' => 'values_save',
      'delete callback' => 'values_delete',
      'export callback' => 'values_export',
      'api' => array(
        'owner' => 'values',
        'api' => 'default_values_sets',
        'minimum_version' => 1,
        'current_version' => 1,
      ),
    ),
    'fields' => array(
      'name' => array(
        'description' => 'Unique ID for value sets.',
        'type' => 'varchar',
        'length' => 255,
      ),
      'title' => array(
        'description' => 'Title of the value set',
        'type' => 'varchar',
        'length' => 255,
      ),
      'description' => array(
        'description' => 'A description of the value set',
        'type' => 'varchar',
        'length' => 255,
      ),
      'data' => array(
        'description' => 'Configured list of values.',
        'type' => 'text',
        'size' => 'big',
        'serialize' => TRUE,
      ),
    ),
    'unique keys' => array(
      'name' => array(
        'name',
      ),
    ),
    'primary key' => array(
      'name',
    ),
  );
  return $schema;
}