Uploaded image for project: 'Liquibase Core'
  1. CORE-3165

Column data type "double" incorrectly translated to "float (24)" for Oracle, should be float

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 3.5.3
    • Fix Version/s: None
    • Component/s: None
    • Environment:

      Oracle 12c

    • Sprint:

      Description

      The following column:

       <column name=" SOME_NAME" type="double">            
        </column>
      

      gets created by Liquibase in Oracle 12с as float 24

      CREATE TABLE table_name
      (
        SOME_NAME FLOAT(24) 
      )
      

      but The following column:

       <column name=" SOME_NAME" type="float">
        </column>
      

      gets created by Liquibase in Oracle 12с as float

      CREATE TABLE table_name
      (
         SOME_NAME  FLOAT
      )
      

      so as you see precision of 'float' exceeds 'double'

      for example:

      let's create this table with different types of data

      CREATE TABLE  "T_TEST_FLOAT"
        (
          "F_24" FLOAT(24),
          "F" FLOAT,                          
          "F_126" FLOAT(126),
          "BD" BINARY_DOUBLE,
          "BF" BINARY_FLOAT,
          "BP" FLOAT(126)
        )
      

      and insert value 11123304506 into every field

      INSERT INTO  T_TEST_FLOAT values(11123304506, 11123304506,11123304506,11123304506,11123304506,11123304506)
      

      outcome will be :

      F_24 F F_126 BD BF BP
      11123305000 11123304506 11123304506 11123304506 11123304400 11123304506

      And liquibase type 'float' epitomized here as F_126 and F

      {which actually the same}

      and 'double' epitomized as F_24

        Attachments

          Activity

            People

            • Reporter:
              nectarius Konstantin
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: