You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@LonwoLonwo talked with team about this; we can look into potential better handling of decimals/currency in snapshots, but unfortunately we don't have capacity to review at the moment. Can you help me better understand your specific use case and the urgency (if any) on your side? Many thanks!
I think that money data type <> decimal data type in PostgreSQL. They are close, but not equals.
I can't provide specific cases, sorry. This request is from our users.
Environment
Liquibase Version: Current version (4.15)
Liquibase Extension(s) & Version: None
Database Vendor & Version: PostgreSQL 13
Description
Money
data type modifies toDECIMAL
in diffChangeLog.I compare two schemas.
The first one (test1) can have as an example this table:
And the second schema (test2) does not have this table.
In this case, I get this result from Liquibase:
DECIMAL - not money.
Or I have a table with a money column in the test1:
And a table with a numeric column in schema test2:
In this case, I get this result:
ALTER TABLE test2."testmoney" ALTER COLUMN col1 TYPE DECIMAL USING (col1::DECIMAL);
PostgreSQL supports money data type, so I think, it can be supported by Liquibase: https://www.postgresql.org/docs/current/datatype-money.html
Possible Solution:
https://github.com/liquibase/liquibase/blob/master/liquibase-core/src/main/java/liquibase/datatype/core/CurrencyType.java
This issue can be fixed in the CurrencyType - just add the PostgreDatabase case.
The text was updated successfully, but these errors were encountered: