Current section

65 Versions

Jump to

Compare versions

4 files changed
+12 additions
-2 deletions
  @@ -1,5 +1,9 @@
1 1 # Changelog for v3.x
2 2
3 + ## v3.13.5 (2026-03-03)
4 +
5 + * [postgrex] Map `:restrict_violation` to `:foreign_key` constraint (required by PostgreSQL 18)
6 +
3 7 ## v3.13.4 (2025-12-27)
4 8
5 9 ### Bug fixes
  @@ -1,6 +1,6 @@
1 1 {<<"links">>,[{<<"GitHub">>,<<"https://github.com/elixir-ecto/ecto_sql">>}]}.
2 2 {<<"name">>,<<"ecto_sql">>}.
3 - {<<"version">>,<<"3.13.4">>}.
3 + {<<"version">>,<<"3.13.5">>}.
4 4 {<<"description">>,<<"SQL-based adapters for Ecto and database migrations">>}.
5 5 {<<"elixir">>,<<"~> 1.14">>}.
6 6 {<<"files">>,
  @@ -28,6 +28,12 @@ if Code.ensure_loaded?(Postgrex) do
28 28 ),
29 29 do: [foreign_key: constraint]
30 30
31 + def to_constraints(
32 + %Postgrex.Error{postgres: %{code: :restrict_violation, constraint: constraint}},
33 + _opts
34 + ),
35 + do: [foreign_key: constraint]
36 +
31 37 def to_constraints(
32 38 %Postgrex.Error{postgres: %{code: :exclusion_violation, constraint: constraint}},
33 39 _opts
  @@ -2,7 +2,7 @@ defmodule EctoSQL.MixProject do
2 2 use Mix.Project
3 3
4 4 @source_url "https://github.com/elixir-ecto/ecto_sql"
5 - @version "3.13.4"
5 + @version "3.13.5"
6 6 @adapters ~w(pg myxql tds)
7 7
8 8 def project do