Skip to content

Loading…

DBAL-41: missing column type "float" #1603

Closed
doctrinebot opened this Issue · 6 comments

2 participants

@doctrinebot

Jira issue originally created by user chriswest:

The former supported column type "float" is not defined in Doctrine\DBAL\Types\Type.

I noticed that floats are mapped like numerics/decimals within mysq right nowl:

protected function _getPortableTableColumnDefinition($tableColumn)
    {
       ...
        // Map db type to Doctrine mapping type
        switch ($dbType) {
            ...
            case 'float':
            case 'double':
            case 'real':
            case 'numeric':
                $type = 'decimal';
                break;

I suggest to map them to a "true" float and double as available in mysql, since they use less storage space compared to numerics with fixed decimals in certain cirtumstances (-> performance issue). http://dev.mysql.com/doc/refman/5.0/en/storage-requirements.html

@doctrinebot

Comment created by @guilhermeblanco:

This issue was already fixed before. Check out line 192 in MySqlSchemaManager.php

@doctrinebot

Comment created by @beberlei:

This issue is regarding the support for an additional Type "Float" vs the "Decimal" which is a precise type.

A quick google over all the vendors shows that they all support floating point numbers.

@doctrinebot

Comment created by steffenvogel:

Push...
Tut sich hier noch was? Oder soll ich mir den Typ lieber selbst implementieren? Bringt es was wenn ich ihn euch dann per Pull-Request ins github mergen kann?

gruß Steffen

@doctrinebot

Comment created by @beberlei:

All currently supported databases have a "DOUBLE PRECISION" type or use that as an alias for their float. Supporting this will be super-easy :-)

@doctrinebot

Comment created by @beberlei:

Implemented and to be released with the RC1

@doctrinebot

Issue was closed with resolution "Fixed"

@beberlei beberlei was assigned by doctrinebot
@doctrinebot doctrinebot added this to the 2.0.0-RC1-RC3 milestone
@doctrinebot doctrinebot closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.