1 schema.inc | protected DatabaseSchema_mysql::processField(array $field) |
Set database-engine specific properties for a field.
Parameters
array $field: A field description array, as specified in the schema documentation.
File
- core/
includes/ database/ mysql/ schema.inc, line 200 - Database schema code for MySQL database servers.
Class
- DatabaseSchema_mysql
- Class to create and manipulate MySQL tables.
Code
protected function processField(array $field) {
if (!isset($field['size'])) {
$field['size'] = 'normal';
}
$map = $this->getFieldTypeMap();
$field['mysql_type'] = $map[$field['type'] . ':' . $field['size']];
if (isset($field['type']) && $field['type'] == 'serial') {
$field['auto_increment'] = TRUE;
}
return $field;
}