1
0
mirror of synced 2024-12-13 22:56:04 +03:00
This commit is contained in:
zYne 2007-04-11 18:29:27 +00:00
parent 01c93d3e02
commit dcab3087f7

View File

@ -134,6 +134,10 @@ class Doctrine_DataDict_Mysql extends Doctrine_DataDict
*/
public function getNativeDeclaration($field)
{
if ( ! isset($field['type'])) {
$field['type'] = null;
}
switch ($field['type']) {
case 'char':
$length = (! empty($field['length'])) ? $field['length'] : false;
@ -214,7 +218,7 @@ class Doctrine_DataDict_Mysql extends Doctrine_DataDict
$length = !empty($field['length']) ? $field['length'] : 18;
return 'DECIMAL(' . $length . ',' . 0 . ')'; //$this->dbh->options['decimal_places'] . ')';
}
throw new Doctrine_DataDict_Exception('Unknown column type.');
throw new Doctrine_DataDict_Exception('Unknown column type ' . $field['type'] . '.');
}
/**
* Maps a native array description of a field to a MDB2 datatype and length