You are here

function apachesolr_reference_field_schema in Apachesolr Reference 7

Implements hook_field_schema().

File

./apachesolr_reference.install, line 10
Contains install and update functions for apachesolr_reference.

Code

function apachesolr_reference_field_schema($field) {
  if ($field['type'] == 'apachesolr_reference') {
    $schema = array(
      'columns' => array(
        'target_id' => array(
          'description' => 'The id of the target SOLR object.',
          'type' => 'varchar',
          'length' => '255',
          'not null' => TRUE,
        ),
      ),
      'indexes' => array(
        'target_id' => array(
          'target_id',
        ),
      ),
    );
    return $schema;
  }
}