Currently we don't do that:
defmodule Person do
use Ecto.Schema
schema "people" do
field :age, :integer, default: "10"
end
end
defmodule PersonTest do
use ExUnit.Case, async: true
test "it works" do
Ecto.TestRepo.insert!(%Person{})
# ** (Ecto.ChangeError) value `"10"` for `Person.age` in `insert` does not match type :integer
end
end
I think we should raise an error during compilation instead.
Similar to https://github.com/dashbitco/nimble_options/pull/50.
Sounds good. We should call dump on it to see if it can be dumped.
Can I take this one?
Yup, go for it!
Most helpful comment
Yup, go for it!