-
Notifications
You must be signed in to change notification settings - Fork 9
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
static table question #313
Comments
Modyllic actually calculates updates, because just trashing and reloading isn't safe given the presence of triggers and constraints. |
The rounding looks like it's because the number is treated as a number inside PHP, which can't represent something to that precision:
|
It looks like that conversion is also what the MySQL database does:
|
So the question is why doesn't Modyllic consider them equivalent. It should be doing the same normalization on both of them and only then comparing. So even if it's normalization was bogus (and it doesn't appear to be) it should still have considered them equal. Now, equality with floating point is always a bit sticky (MySQL considers that db value to be equal to neither 3.673 nor to 3.6729999999999996), so I think what we want to do is do a string compare, as PHP's equality operators are so magic as to be detrimental. |
So comparison for the purposes of diffing is handled by Normalization goes to I think what we want to do is change the |
Hello Modyllic Team,
We have a static table. Modyllic indicated that only specific rows changed and produced update statements against those rows.
We thought static tables were always completely dropped and then recreated. Are we wrong?
Here is the issue: it looks like the rows that Modyllic wants to change may not have actually changed, but that there is a number/decimal problem.
The current row says:
Modyllic wants to change it to 3.673 which we found curious, so we looked at our schema file. The value there is 3.6729999999999996. It appears Modyllic is doing some rounding on its own, our data looks different to what Modyllic things it should be, and Modyllic tries to change it again.
Can you look into this decimal/rounding issue? Thanks!
The text was updated successfully, but these errors were encountered: