Closed dianjin closed 8 years ago
Hey @dianjin! that's interesting, the example app has the same model and it's working correctly. What ecto version are you running?
My deps:
defp deps do
[{:phoenix, "~> 1.2"},
{:phoenix_ecto, "~> 3.0"},
{:absinthe_plug, "~> 1.1"},
{:postgrex, ">= 0.0.0"},
{:timex, ">= 0.0.0"},
{:phoenix_html, "~> 2.3"},
{:phoenix_live_reload, "~> 1.0", only: :dev},
{:ecto, "~> 1.0.0", override: true},
{:cowboy, "~> 1.0"},
{:addict, "~> 0.3"}
]
end
I added the "override:true" to ecto since when I first added the addict dependency, mix deps.get failed because of conflicting inter-dependencies or something of that nature - a post on StackOverflow suggested to add the "override: true" which then enabled me to run mix deps.get with addict.
Ohh I see. So, Addict now depends on Ecto 2.0
. Do you have any hard dependency on Ecto 1.0
? Please check #98 for more information on it.
An alternative would be to use version 0.2.5
of Addict, but you'll be missing out new features and enhancements that will appear in the future.
Okay, I changed my deps to ecto version 2.0.0 and it worked. Thanks for the assistance! 😃
Glad it fixed it :smile:
Hey, I'm new to Phoenix so I'm unsure if this is an error on my end or Addict's end. Anyway, I'm using the timestamps macro to add inserted_at and updated_at columns in my User model. When I tried to register a user though, I got the following error:
So it looks like the inserted_at and updated_at fields are nil, though I'm not clear on where they are null and where they are expected to be automatically set. Here is my User schema:
And the table, if it's relevant:
Am I doing it right? Thank you! 😄