| Versionen | |
|---|---|
| drupal7 | protected DatabaseSchema_sqlite::processField($field) |
Set database-engine specific properties for a field.
$field A field description array, as specified in the schema documentation.
includes/
<?php
protected function processField($field) {
if (!isset($field['size'])) {
$field['size'] = 'normal';
}
// Set the correct database-engine specific datatype.
if (!isset($field['sqlite_type'])) {
$map = $this->getFieldTypeMap();
$field['sqlite_type'] = $map[$field['type'] . ':' . $field['size']];
}
if ($field['type'] == 'serial') {
$field['auto_increment'] = TRUE;
}
return $field;
}
?>
Kommentare
Kommentar hinzufügen