Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
add decimal type for unsigned
  • Loading branch information
imsamurai committed Nov 14, 2013
1 parent 15805e6 commit f1a2c1a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Cake/Model/Datasource/Database/Mysql.php
Expand Up @@ -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')
)
);

Expand Down
9 changes: 9 additions & 0 deletions lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php
Expand Up @@ -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'
)
);
}
Expand Down

0 comments on commit f1a2c1a

Please sign in to comment.