double_field.install in Double Field 7
Same filename and directory in other branches
Install, update and uninstall functions for the double field module.
File
double_field.installView source
<?php
/**
 * @file
 * Install, update and uninstall functions for the double field module.
 */
/**
 * Implements hook_field_schema().
 */
function double_field_field_schema($field) {
  $columns = array(
    'first' => array(
      'type' => 'varchar',
      'length' => $field['settings']['first_maxlength'],
      'not null' => FALSE,
    ),
    'second' => array(
      'type' => 'varchar',
      'length' => $field['settings']['second_maxlength'],
      'not null' => FALSE,
    ),
  );
  $indexes = array(
    'first' => array(
      'first',
    ),
    'second' => array(
      'second',
    ),
  );
  return array(
    'columns' => $columns,
    'indexes' => $indexes,
  );
}Functions
| Name   | Description | 
|---|---|
| double_field_field_schema | Implements hook_field_schema(). | 
