options.install

Install, update and uninstall functions for the options module.

File

drupal/core/modules/options/options.install
View source
<?php

/**
 * @file
 * Install, update and uninstall functions for the options module.
 */

/**
 * Implements hook_field_schema().
 */
function options_field_schema($field) {
  switch ($field['type']) {
    case 'list_text':
      $columns = array(
        'value' => array(
          'type' => 'varchar',
          'length' => 255,
          'not null' => FALSE,
        ),
      );
      break;
    case 'list_float':
      $columns = array(
        'value' => array(
          'type' => 'float',
          'not null' => FALSE,
        ),
      );
      break;
    case 'list_integer':
    case 'list_boolean':
      $columns = array(
        'value' => array(
          'type' => 'int',
          'not null' => FALSE,
        ),
      );
      break;
  }
  return array(
    'columns' => $columns,
    'indexes' => array(
      'value' => array(
        'value',
      ),
    ),
  );
}

Functions

Namesort descending Description
options_field_schema Implements hook_field_schema().