You are here

function signaturefield_field_schema in SignatureField 7

Same name and namespace in other branches
  1. 7.2 signaturefield.install \signaturefield_field_schema()

Implements hook_field_schema().

Defines the database schema of the field, using the format used by the Schema API.

All implementations of hook_field_schema() must be in the module's .install file.

See also

http://drupal.org/node/146939

Schema API

hook_field_schema()

File

./signaturefield.install, line 22
Install, update, and uninstall functions for the field_example module.

Code

function signaturefield_field_schema($field) {
  $columns = array(
    'data' => array(
      'type' => 'text',
      'not null' => FALSE,
    ),
    'color' => array(
      'type' => 'varchar',
      'length' => 7,
      'not null' => FALSE,
    ),
    'width' => array(
      'type' => 'varchar',
      'length' => 3,
      'not null' => FALSE,
    ),
    'height' => array(
      'type' => 'varchar',
      'length' => 2,
      'not null' => FALSE,
    ),
  );
  return array(
    'columns' => $columns,
  );
}