New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SQL type FLOAT should not be used for economical data #12575
Comments
Why not? Links to any studies? Performance tests? Other known problems? |
Precision. |
And today I tried to get all conversions with revenue = |
Here's a stackoverflow thread about it: https://stackoverflow.com/questions/13030368/best-data-type-to-store-money-values-in-mysql
|
Looks like 4 decimals places (to accommodate Chile) would suffice. https://en.wikipedia.org/wiki/ISO_4217 |
We can't address this issue prior Matomo 4.0, as we try to avoid any schema changes to log tables in minor releases... |
Note: We'll only change it for new installs and create an FAQ for existing installs. For more details see https://github.com/matomo-org/matomo/pull/15408/files#r367739574 |
@sgiehl there are still some floats in other tables like log_conversion which we may want to change. Could also check there if |
|
In table
log_conversion
,revenue
has typeFLOAT
. It should beDECIMAL(11, 2)
or similar.The text was updated successfully, but these errors were encountered: