Skip to content

Commit

Permalink
change position from afterDefault to beforeDefault during to wrong or…
Browse files Browse the repository at this point in the history
…der, add test
  • Loading branch information
imsamurai committed Nov 13, 2013
1 parent e35823e commit fd64d95
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Cake/Model/Datasource/Database/Mysql.php
Expand Up @@ -88,7 +88,7 @@ class Mysql extends DboSource {
'collate' => array('value' => 'COLLATE', 'quote' => false, 'join' => ' ', 'column' => 'Collation', 'position' => 'beforeDefault'),
'comment' => array('value' => 'COMMENT', 'quote' => true, 'join' => ' ', 'column' => 'Comment', 'position' => 'afterDefault'),
'unsigned' => array(
'value' => 'UNSIGNED', 'quote' => false, 'join' => ' ', 'column' => false, 'position' => 'afterDefault',
'value' => 'UNSIGNED', 'quote' => false, 'join' => ' ', 'column' => false, 'position' => 'beforeDefault',
'noVal' => true,
'options' => array(true),
'types' => array('integer', 'float', 'biginteger', 'numeric')
Expand Down
10 changes: 10 additions & 0 deletions lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php
Expand Up @@ -3253,6 +3253,16 @@ public function buildColumnUnsignedProvider() {
'unsigned' => true
),
'`testName` decimal UNSIGNED'
),
//set #7
array(
array(
'name' => 'testName',
'type' => 'numeric',
'unsigned' => true,
'default' => 1
),
'`testName` decimal UNSIGNED DEFAULT 1'
)
);
}
Expand Down

0 comments on commit fd64d95

Please sign in to comment.