View Source Changelog
When upgrading from ex_money_sql
version 1.3.x
to 1.4.x
and later, please read the important migration information in the README
money_sql-v1-7-2
Money_SQL v1.7.2
This is the changelog for Money_SQL v1.7.2 released on August 27th, 2022.
Note That money_sql
is now supported on Elixir 1.11 and later only.
bug-fixes
Bug Fixes
- Makes the aggregate functions parallel-safe which provides up to 100% speed improvement. Thanks to @milangupta1 for the PR.
money_sql-v1-7-1
Money_SQL v1.7.1
This is the changelog for Money_SQL v1.7.1 released on July 8th, 2022.
Note That money_sql
is now supported on Elixir 1.11 and later only.
bug-fixes-1
Bug Fixes
- Fixes casting a money map when the currency is
nil
. Thanks to @frahugo for the report. Closes #24.
money_sql-v1-7-0
Money_SQL v1.7.0
This is the changelog for Money_SQL v1.7.0 released on May 21st, 2022.
Note That money_sql
is now supported on Elixir 1.11 and later only.
enhancements
Enhancements
- Adds the module
Money.Validation
to provide Ecto Changeset validations. In particular it addsMoney.Validation.validate_money/3
which behaves exactly likeEcto.Changeset.validate_number/3
only forMoney.t/0
types.
money_sql-v1-6-0
Money_SQL v1.6.0
This is the changelog for Money_SQL v1.6.0 released on December 31st, 2021.
Note That money_sql
is now supported on Elixir 1.10 and later only.
enhancements-1
Enhancements
t:Money.Ecto.Composite.Type
andt:Money.Ecto.Map.Type
now return the exception module when there is an error incast/1
. For example:
iex> Money.Ecto.Composite.Type.cast("") ==
{:error,
[
exception: Money.InvalidAmountError,
message: "Amount cannot be converted to a number: \"\""
]}
The expected exceptions are:
Thanks to @DaTrader for the enhancement request.
money_sql-v1-5-2
Money_SQL v1.5.2
This is the changelog for Money_SQL v1.5.2 released on December 13th, 2021.
Note That money_sql
is now supported on Elixir 1.10 and later only.
bug-fixes-2
Bug Fixes
- Fixes
Ecto.ParameterizedType.embed_as/2
callback for theEcto.ParameterizedType
behaviour. Thanks to @nseantanly for the report and the PR.
money_sql-v1-5-1
Money_SQL v1.5.1
This is the changelog for Money_SQL v1.5.1 released on December 8th, 2021.
Note That money_sql
is now supported on Elixir 1.10 and later only.
bug-fixes-3
Bug Fixes
Implements
Ecto.ParameterizedType.equal?/3
callback for theEcto.ParameterizedType
behaviour. Thanks to @namhoangyojee for the report and the PR.Adds
@impl Ecto.ParamaterizedType
to the relevant callbacks.
money_sql-v1-5-0
Money_SQL v1.5.0
This is the changelog for Money_SQL v1.5.0 released on September 25th, 2021.
enhancements-2
Enhancements
Adds a
+
operator for the Postgres type:money_with_currency
The name of the migration to create the
:money_with_currency
type has shortened to bemoney.gen.postgres.money_with_currency
money_sql-v1-4-5
Money_SQL v1.4.5
This is the changelog for Money_SQL v1.4.5 released on June 3rd, 2021.
bug-fixes-4
Bug Fixes
- Remove conditional compilation in
Money.Ecto.Composite.Type
- the type is alwaysEcto.ParameterizedType
.
money_sql-v1-4-4
Money_SQL v1.4.4
This is the changelog for Money_SQL v1.4.4 released on March 18th, 2021.
bug-fixes-5
Bug Fixes
- Don't use
is_struct/1
guard to support compatibility on older Elixir releases
money_sql-v1-4-3
Money_SQL v1.4.3
This is the changelog for Money_SQL v1.4.3 released on February 17th, 2021.
bug-fixes-6
Bug Fixes
- Don't propogate a
:default
option into thet:Money
from the schema. Fixes #14. Thanks to @emaiax.
money_sql-v1-4-2
Money_SQL v1.4.2
This is the changelog for Money_SQL v1.4.2 released on February 12th, 2021.
bug-fixes-7
Bug Fixes
- Dumping/loading
nil
returns{:ok, nil}
. Thanks to @morinap.
money_sql-v1-4-1
Money_SQL v1.4.1
This is the changelog for Money_SQL v1.4.1 released on February 11th, 2021.
bug-fixes-8
Bug Fixes
- Casting
nil
returns{:ok, nil}
. Thanks to @morinap.
money_sql-v1-4-0
Money_SQL v1.4.0
This is the changelog for Money_SQL v1.4.0 released on February 10th, 2021.
bug-fixes-9
Bug Fixes
Fix parsing error handling in
Money.Ecto.Composite.Type.cast/2
. Thanks to @NikitaAvvakumov. Closes #10.Fix casting localized amounts. Thanks to @olivermt. Closes #11.
enhancements-3
Enhancements
- Changes
Money.Ecto.Composite.Type
andMoney.Ecto.Map.Type
to beParameterizedType
. As a result, Ecto 3.5 or later is required. This change allows configuration of format options for the:money_with_currency
to added as parameters in the Ecto schema. For the example schema:
The fielddefmodule Organization do use Ecto.Schema @primary_key false schema "organizations" do field :payroll, Money.Ecto.Composite.Type field :tax, Money.Ecto.Composite.Type, fractional_digits: 4 field :name, :string field :employee_count, :integer timestamps() end end
:tax
will be instantiated as aMoney.t
with:format_options
offractional_digits: 4
.
money_sql-v1-3-1
Money_SQL v1.3.1
This is the changelog for Money_SQL v1.3.1 released on September 30th, 2020.
bug-fixes-10
Bug Fixes
- Fixes compatibility with both
Decimal
version1.x
and2.x
. Thanks to @doughsay and @coladarci for the report. Closes #8.
money_sql-v1-3-0
Money_SQL v1.3.0
This is the changelog for Money_SQL v1.3.0 released on January 30th, 2020.
enhancements-4
Enhancements
- Updates to
ex_money
version5.0
. Thanks to @morgz
money_sql-v1-2-1
Money_SQL v1.2.1
This is the changelog for Money_SQL v1.2.1 released on November 3rd, 2019.
bug-fixes-11
Bug Fixes
Fixes
Money.Ecto.Composite.Type
andMoney.Ecto.Map.Type
by ensuring theload/1
andcast/1
callbacks conform to their typespecs. Thanks to @bgracie. Closes #4 and #5.Fixes the migration templates for
money.gen.postgres.aggregate_functions
to usenumeric
intermediate types rather thannumeric(20,8)
. For current installations it should be enough to runmix money.gen.postgres.aggregate_functions
again followed bymix ecto.migrate
to install the corrected aggregate function.
money_sql-v1-2-0
Money_SQL v1.2.0
This is the changelog for Money_SQL v1.2.0 released on November 2nd, 2019.
bug-fixes-12
Bug Fixes
- Removes the precision specification from intermediate results of the
sum
aggregate function for Postgres.
enhancements-5
Enhancements
- Adds
equal?/2
callbacks to theMoney.Ecto.Composite.Type
andMoney.Ecto.Map.Type
forecto_sql
version 3.2
money_sql-v1-1-0
Money_SQL v1.1.0
This is the changelog for Money_SQL v1.1.0 released on August 22nd, 2019.
enhancements-6
Enhancements
- Renames the migration that generator that creates the Postgres composite type to be more meaningful.
bug-fixes-13
Bug Fixes
- Correctly generate and execute migrations. Fixes #1 and #2. Thanks to @davidsulc, @KungPaoChicken.
money_sql-v1-0-0
Money_SQL v1.0.0
This is the changelog for Money_SQL v1.0.0 released on July 8th, 2019.
enhancements-7
Enhancements
- Initial release. Extracted from ex_money