View source
<?php
function dimension_field_schema($field) {
list($has_length, $has_more) = _dimension_get_modes($field['settings']['mode']);
$columns = array();
if ($has_length) {
$columns['length'] = array(
'type' => 'varchar',
'length' => 10,
'not null' => FALSE,
);
}
if ($has_more) {
$columns['width'] = array(
'type' => 'varchar',
'length' => 10,
'not null' => FALSE,
);
$columns['height'] = array(
'type' => 'varchar',
'length' => 10,
'not null' => FALSE,
);
}
return array(
'columns' => $columns,
'indexes' => array(),
);
}