Details

    • Type: New Feature New Feature
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0.0-RC1-RC3
    • Component/s: None
    • Labels:
      None

      Description

      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

        Activity

        Hide
        Guilherme Blanco added a comment -

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

        Show
        Guilherme Blanco added a comment - This issue was already fixed before. Check out line 192 in MySqlSchemaManager.php
        Hide
        Benjamin Eberlei added a comment -

        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.

        Show
        Benjamin Eberlei added a comment - 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.
        Hide
        Steffen Vogel added a comment -

        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

        Show
        Steffen Vogel added a comment - 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
        Hide
        Benjamin Eberlei added a comment -

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

        Show
        Benjamin Eberlei added a comment - All currently supported databases have a "DOUBLE PRECISION" type or use that as an alias for their float. Supporting this will be super-easy
        Hide
        Benjamin Eberlei added a comment -

        Implemented and to be released with the RC1

        Show
        Benjamin Eberlei added a comment - Implemented and to be released with the RC1

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Christian Ehmig
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: