function _image_update_7002_add_columns
Add width and height columns to a specific table.
Parameters
$table: The name of the database table to be updated.
$columns: Keyed array of columns this table is supposed to have.
Related topics
1 call to _image_update_7002_add_columns()
- image_update_7002 in modules/
image/ image.install - Add width and height columns to image field schema and populate.
File
-
modules/
image/ image.install, line 288
Code
function _image_update_7002_add_columns($table, $field_name) {
$spec = array(
'type' => 'int',
'unsigned' => TRUE,
);
$spec['description'] = 'The width of the image in pixels.';
db_add_field($table, $field_name . '_width', $spec);
$spec['description'] = 'The height of the image in pixels.';
db_add_field($table, $field_name . '_height', $spec);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.