Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Adding float precision support to CakeSchema when using Sqlsrv

  • Loading branch information...
commit 9f85e24413815ba5cd1c1d8d86e2a6ccdb6d902b 1 parent 0cc76b3
@lorenzo lorenzo authored
Showing with 3 additions and 0 deletions.
  1. +3 −0  lib/Cake/Model/Datasource/Database/Sqlserver.php
View
3  lib/Cake/Model/Datasource/Database/Sqlserver.php
@@ -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();
Please sign in to comment.
Something went wrong with that request. Please try again.