Browse Source

Fixed converting double to PHP type

tags/2.0.3
Alexander Makarov 10 years ago
parent
commit
187322052d
  1. 1
      framework/db/Schema.php
  2. 4
      tests/unit/framework/db/SchemaTest.php

1
framework/db/Schema.php

@ -494,6 +494,7 @@ abstract class Schema extends Object
'bigint' => 'integer', 'bigint' => 'integer',
'boolean' => 'boolean', 'boolean' => 'boolean',
'float' => 'double', 'float' => 'double',
'double' => 'double',
'binary' => 'resource', 'binary' => 'resource',
]; ];
if (isset($typeMap[$column->type])) { if (isset($typeMap[$column->type])) {

4
tests/unit/framework/db/SchemaTest.php

@ -180,7 +180,7 @@ class SchemaTest extends DatabaseTestCase
'defaultValue' => null, 'defaultValue' => null,
], ],
'float_col' => [ 'float_col' => [
'type' => 'float', 'type' => 'double',
'dbType' => 'double(4,3)', 'dbType' => 'double(4,3)',
'phpType' => 'double', 'phpType' => 'double',
'allowNull' => false, 'allowNull' => false,
@ -192,7 +192,7 @@ class SchemaTest extends DatabaseTestCase
'defaultValue' => null, 'defaultValue' => null,
], ],
'float_col2' => [ 'float_col2' => [
'type' => 'float', 'type' => 'double',
'dbType' => 'double', 'dbType' => 'double',
'phpType' => 'double', 'phpType' => 'double',
'allowNull' => true, 'allowNull' => true,

Loading…
Cancel
Save