Skip to content

Money SQL version 1.10.0

Compare
Choose a tag to compare
@kipcole9 kipcole9 released this 30 Oct 04:12
· 19 commits to master since this release

Bug Fixes

  • The mix tasks that generate database function migrations (money.gen.postgres.sum_function, money.gen.postgres.plus_operator and money.gen.postgres.min_max_functions) need to be aware of the type of the money_with_currency "amount" element in a Postgres database. In releases of ex_money_sql up to 1.7.1 the type was char(3). In later releases is changed to the more canonical varchar. In turn, the database functions need to know the type for the internal accumulator. It is possible, as illustrated in issue #36, to have generated the money_with_currency type as char(3) and then move to a later release of ex_money_sql. In which case the money database function migrations would fail because they were built with varchar accumulators. This release will detect the underlying type of the money_with_currency "amount" element and adjust the migration accordingly. Thanks to @bigardone for the report and motivation to get this done. Closes #36.

Enhancements

  • Adds database functions for unary negation and the operation -. Thanks to @zachdaniel for the PR.