diff --git a/lib/Cake/Model/Datasource/Database/Sqlserver.php b/lib/Cake/Model/Datasource/Database/Sqlserver.php index ba6c491c1..dae0b4584 100644 --- a/lib/Cake/Model/Datasource/Database/Sqlserver.php +++ b/lib/Cake/Model/Datasource/Database/Sqlserver.php @@ -238,7 +238,6 @@ class Sqlserver extends DboSource { $fields[$field]['length'] = $fields[$field]['length'] . ',' . $column->Size; } } - debug($fields); $this->__cacheDescription($table, $fields); $cols->closeCursor(); return $fields; diff --git a/lib/Cake/Test/Case/Model/Datasource/Database/SqlserverTest.php b/lib/Cake/Test/Case/Model/Datasource/Database/SqlserverTest.php index f6a9a8bd4..9c438123a 100644 --- a/lib/Cake/Test/Case/Model/Datasource/Database/SqlserverTest.php +++ b/lib/Cake/Test/Case/Model/Datasource/Database/SqlserverTest.php @@ -402,7 +402,16 @@ class SqlserverTest extends CakeTestCase { 'Length' => -1, 'Null' => 'YES', 'Type' => 'nvarchar' - ) + ), + (object) array( + 'Default' => '', + 'Field' => 'published', + 'Key' => 0, + 'Type' => 'datetime2', + 'Length' => 8, + 'Null' => 'YES', + 'Size' => '' + ), )); $this->db->executeResultsStack = array($SqlserverTableDescription); $dummyModel = $this->model; @@ -419,6 +428,12 @@ class SqlserverTest extends CakeTestCase { 'null' => true, 'default' => null, 'length' => null + ), + 'published' => array( + 'type' => 'datetime', + 'null' => true, + 'default' => '', + 'length' => null ) ); $this->assertEqual($expected, $result);