diff --git a/lib/Cake/Model/Datasource/Database/Mysql.php b/lib/Cake/Model/Datasource/Database/Mysql.php index 34252256be1..26f5affea20 100644 --- a/lib/Cake/Model/Datasource/Database/Mysql.php +++ b/lib/Cake/Model/Datasource/Database/Mysql.php @@ -91,7 +91,7 @@ class Mysql extends DboSource { 'value' => 'UNSIGNED', 'quote' => false, 'join' => ' ', 'column' => false, 'position' => 'beforeDefault', 'noVal' => true, 'options' => array(true), - 'types' => array('integer', 'float', 'biginteger', 'numeric') + 'types' => array('integer', 'float', 'biginteger', 'numeric', 'decimal') ) ); diff --git a/lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php b/lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php index 4a76ddbe379..d29a402af61 100644 --- a/lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php +++ b/lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php @@ -3262,6 +3262,15 @@ public function buildColumnUnsignedProvider() { 'default' => 1 ), '`testName` decimal UNSIGNED DEFAULT 1' + ), + //set #8 + array( + array( + 'name' => 'testName', + 'type' => 'decimal', + 'unsigned' => true + ), + '`testName` decimal UNSIGNED' ) ); }