Skip to content

Commit

Permalink
Adding float precision support to CakeSchema when using Sqlsrv
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Jun 20, 2011
1 parent 0cc76b3 commit 9f85e24
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/Cake/Model/Datasource/Database/Sqlserver.php
Expand Up @@ -221,6 +221,9 @@ public function describe($model) {
if (in_array($fields[$field]['type'], array('date', 'time', 'datetime', 'timestamp'))) {
$fields[$field]['length'] = null;
}
if ($fields[$field]['type'] == 'float' && !empty($column->Size)) {
$fields[$field]['length'] = $fields[$field]['length'] . ',' . $column->Size;
}
}
$this->__cacheDescription($table, $fields);
$cols->closeCursor();
Expand Down

0 comments on commit 9f85e24

Please sign in to comment.