signaturefield.install in SignatureField 7
Same filename and directory in other branches
Install, update, and uninstall functions for the field_example module.
File
signaturefield.installView source
<?php
/**
* @file
* Install, update, and uninstall functions for the field_example module.
*/
/**
* 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 http://drupal.org/node/146939
* @see schemaapi
* @see hook_field_schema()
* @ingroup field_example
*/
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,
);
}
Functions
Name![]() |
Description |
---|---|
signaturefield_field_schema | Implements hook_field_schema(). |