function hook_field_storage_update_field


Error message

User warning: The following module is missing from the file system: theme/theme. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1156 of /var/www/html/elmsln_community/
cis7 field.api.php hook_field_storage_update_field($field, $prior_field, $has_data)
cle7 field.api.php hook_field_storage_update_field($field, $prior_field, $has_data)
elmsmedia7 field.api.php hook_field_storage_update_field($field, $prior_field, $has_data)
icor7 field.api.php hook_field_storage_update_field($field, $prior_field, $has_data)
meedjum_blog7 field.api.php hook_field_storage_update_field($field, $prior_field, $has_data)
mooc7 field.api.php hook_field_storage_update_field($field, $prior_field, $has_data)

Update the storage information for a field.

This is invoked on the field's storage module from field_update_field(), before the new field information is saved to the database. The field storage module should update its storage tables to agree with the new field information. If there is a problem, the field storage module should throw an exception.


$field: The updated field structure to be saved.

$prior_field: The previously-saved field structure.

$has_data: TRUE if the field has data in storage currently.

Related topics

1 function implements hook_field_storage_update_field()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

field_sql_storage_field_storage_update_field in modules/field/modules/field_sql_storage/field_sql_storage.module
Implements hook_field_storage_update_field().
1 invocation of hook_field_storage_update_field()
field_update_field in modules/field/
Updates a field.


modules/field/field.api.php, line 550


function hook_field_storage_update_field($field, $prior_field, $has_data) {
  if (!$has_data) {
    // There is no data. Re-create the tables completely.
    $prior_schema = _field_sql_storage_schema($prior_field);
    foreach ($prior_schema as $name => $table) {
      db_drop_table($name, $table);
    $schema = _field_sql_storage_schema($field);
    foreach ($schema as $name => $table) {
      db_create_table($name, $table);
  else {
    // There is data. See field_sql_storage_field_storage_update_field() for
    // an example of what to do to modify the schema in place, preserving the
    // old data as much as possible.
  drupal_get_schema(NULL, TRUE);