Skip to content
Permalink
Browse files

Fix stupid mistakes and remove default precision.

Making schema explicit is better I think.
  • Loading branch information...
markstory committed May 10, 2013
1 parent a35a0dd commit a4225bc9a21a84e8c3652ae077898a4d1b3cd533
@@ -227,8 +227,7 @@ public function columnSql(Table $table, $name) {
in_array($data['type'], $hasPrecision, true) &&
(isset($data['length']) || isset($data['precision']))
) {
$data += ['length' => 11, 'precision' => 3];
$out .= '(' . (int)$data['length'] . ', ' . (int)$data['precision'] . ')';
$out .= '(' . (int)$data['length'] . ',' . (int)$data['precision'] . ')';
}
if (isset($data['null']) && $data['null'] === false) {
$out .= ' NOT NULL';
@@ -323,12 +323,12 @@ public static function columnSqlProvider() {
[
'value',
['type' => 'decimal', 'length' => 11],
'`value` FLOAT(11, 3)'
'`value` DECIMAL(11,0)'
],
[
'value',
['type' => 'decimal', 'length' => 12, 'precision' => 5],
'`value` FLOAT(12, 5)'
'`value` DECIMAL(12,5)'
],
// Float
[
@@ -338,8 +338,8 @@ public static function columnSqlProvider() {
],
[
'value',
['type' => 'float', 'length' => 11],
'`value` FLOAT(11, 3)'
['type' => 'float', 'length' => 11, 'precision' => 3],
'`value` FLOAT(11,3)'
],
// Boolean
[

0 comments on commit a4225bc

Please sign in to comment.
You can’t perform that action at this time.