function field_sql_storage_field_update_forbid
field_sql_storage_field_update_forbid($field, $prior_field, $has_data)
Implements hook_field_update_forbid().
Forbid any field update that changes column definitions if there is any data.
File
- modules/field/modules/field_sql_storage/field_sql_storage.module, line 280
- Default implementation of the field storage API.
Code
function field_sql_storage_field_update_forbid($field, $prior_field, $has_data) { if ($has_data && $field['columns'] != $prior_field['columns']) { throw new FieldUpdateForbiddenException("field_sql_storage cannot change the schema for an existing field with data."); } }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!field!modules!field_sql_storage!field_sql_storage.module/function/field_sql_storage_field_update_forbid/7.x