function imagefield_crop_update_7201 in Imagefield Crop 7.2
Same name and namespace in other branches
- 7.3 imagefield_crop.install \imagefield_crop_update_7201()
Enlarge size of Alt and Title columns.
File
- ./
imagefield_crop.install, line 80 - Module installation file.
Code
function imagefield_crop_update_7201() {
$alt_spec = array(
'type' => 'varchar',
'length' => 512,
'not null' => FALSE,
);
$title_spec = array(
'type' => 'varchar',
'length' => 1024,
'not null' => FALSE,
);
$fields = _update_7000_field_read_fields(array(
'module' => 'imagefield_crop',
'storage_type' => 'field_sql_storage',
));
foreach ($fields as $field_name => $field) {
$tables = array(
_field_sql_storage_tablename($field),
_field_sql_storage_revision_tablename($field),
);
$alt_column = $field['field_name'] . '_alt';
$title_column = $field['field_name'] . '_title';
foreach ($tables as $table) {
db_change_field($table, $alt_column, $alt_column, $alt_spec);
db_change_field($table, $title_column, $title_column, $title_spec);
}
}
}