phalcon / migrations

Generate or migrate database changes via migrations.
https://docs.phalcon.io/latest/en/db-migrations
BSD 3-Clause "New" or "Revised" License
27 stars 23 forks source link

Removing Column::TYPE_DECIMAL from noSizeColumnType #77

Closed jturbide closed 4 years ago

jturbide commented 4 years ago

According to my test using MySQL / MariaDB, "float" type and "double" type could handle the scale property without the size. On the other hand, "decimal" type and "numeric" type doesn't seem to handle the scale without any size provided.

DECIMAL(0,2) NOT NULL AFTER chargeERROR: SQLSTATE[42000]: Syntax error or access violation: 1427 For float(M,D), double(M,D) or decimal(M,D), M must be >= D (column 'amount')
Obviously because it's "0" instead of "10"
codecov[bot] commented 4 years ago

Codecov Report

Merging #77 into master will increase coverage by 0.07%. The diff coverage is n/a.

@@             Coverage Diff              @@
##             master      #77      +/-   ##
============================================
+ Coverage     47.44%   47.51%   +0.07%     
  Complexity      498      498              
============================================
  Files            20       20              
  Lines          1330     1330              
============================================
+ Hits            631      632       +1     
+ Misses          699      698       -1