I have little problem with EctoNetwork:
my schema:
schema "test" do
field(:req_ip, EctoNetwork.INET)
end
my migration:
create table(:test) do
add(:req_ip, :inet)
end
It seems ok and it woks when I run the project.
But in the test mode I face with this issue.
** (DBConnection.EncodeError) Postgrex expected a binary, got %Postgrex.INET{address: {127, 0, 0, 1}, netmask: 32}. Please make sure the value you are passing matches the definition in your table or in your query or convert the value accordingly.
Any idea ?