You are here

function classy_paragraphs_field_schema in Classy paragraphs 7

Implements hook_field_schema().

File

./classy_paragraphs.install, line 18
Install, update and uninstall functions for the Classy Paragraphs module.

Code

function classy_paragraphs_field_schema($field) {
  $columns = array();
  switch ($field['type']) {
    case CLASSY_PARAGRAPHS_FIELD_TYPE_LIST:
      $columns = array(
        'value' => array(
          'type' => 'varchar',
          'length' => 255,
          'not null' => FALSE,
        ),
      );
      break;
  }
  return array(
    'columns' => $columns,
    'indexes' => array(
      'value' => array(
        'value',
      ),
    ),
  );
}