Skip to content

Wrong type of currency created for MySQL #461

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

Closed
php-coder opened this issue Aug 24, 2016 · 2 comments
Closed

Wrong type of currency created for MySQL #461

php-coder opened this issue Aug 24, 2016 · 2 comments
Assignees
Labels
environment/prod Issue affects only production environment kind/bug
Milestone

Comments

@php-coder
Copy link
Owner

For some strange reason type CURRENCY from Liquibase was translated into decimal(10,0) in MySQL. This leads to the bug when you're inserting 2.8 but it's rounded and inserted as 3.

Related to #198

CC @cssru: JFYI

@php-coder php-coder added kind/bug environment/prod Issue affects only production environment labels Aug 24, 2016
@php-coder php-coder added this to the 0.4 milestone Aug 24, 2016
@php-coder php-coder self-assigned this Aug 24, 2016
@php-coder
Copy link
Owner Author

This is a possible fix:

mysql> ALTER TABLE series_sales MODIFY `first_price` decimal(10,2);
mysql> ALTER TABLE series_sales MODIFY `second_price` decimal(10,2);

@php-coder
Copy link
Owner Author

php-coder commented Aug 27, 2016

I decided to use DECIMAL(19,2) type to make it consistence with other currency fields.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
environment/prod Issue affects only production environment kind/bug
Projects
None yet
Development

No branches or pull requests

1 participant