Can someone help with what should be a stupid mistake that I'm afraid of. Consider these two fragments:
defmodule MosaicApi.Repo.Migrations.CreateCard do use Ecto.Migration def change do create table(:cards) do add :creation_date, :date
and
defmodule MosaicApi.Card do use MosaicApi.Web, :model schema "cards" do field :creation_date, Ecto.Date
I am trying to sow some data using
cards = [ %Card{ creation_date: "2014-04-17",
I got these simple lines from the things I found on the Internet; the alternative seemed to be {"2015", "04", "17"}.
** (Ecto.ChangeError) value "2014-04-17" for MosaicApi.Card.creation_date in insert does not match the Ecto.Date type
source share