field_test_schema_alter.install
Install, update and uninstall functions for the field_test_schema_alter module.
File
-
modules/
field/ tests/ field_test_schema_alter.install
View source
<?php
/**
* @file
* Install, update and uninstall functions for the field_test_schema_alter module.
*/
/**
* Implements hook_field_schema_alter().
*/
function field_test_schema_alter_field_schema_alter(&$schema, $field) {
if ($field['type'] == 'test_field') {
// Alter the field type.
$schema['columns']['value']['type'] = 'float';
// Add an additional column of data.
$schema['columns']['additional_column'] = array(
'description' => "Additional column added to image field table.",
'type' => 'varchar',
'length' => 128,
'not null' => FALSE,
);
}
}
Functions
Title | Deprecated | Summary |
---|---|---|
field_test_schema_alter_field_schema_alter | Implements hook_field_schema_alter(). |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.