Robert Francis
                                            Robert Francis
                                        
                                    ```ex User.all() |> Enum.map(fn(user) -> params = case user.admin do true -> %{ role: "site_admin", verified: user.inserted_at } _ -> %{role: "venue_admin"} end user |> Ecto.Changeset.cast(params, [ :email, :password, :admin,...
@nelsonic It's not the addition of the new fields that is changing the `email_hash` and `password`. It's the `User.update` (`Alog.update`) function which appears to be changing the values.
@Danwhy why is [the query in the `all/0`](https://github.com/dwyl/alog/blob/master/lib/alog.ex#L249-L260) function split into `sub` and `query`? ```elixir sub = from(m in __MODULE__, distinct: m.entry_id, order_by: [desc: :updated_at], select: m ) query =...
Don't know why I didn't think of this last night 😑 I'll just check it myself by updating the query and running the tests locally.
#### Comment schema in app ```ex schema "comments" do field :comment, :string field :comment_id_no, :string field :show, :boolean timestamps() end ``` #### Calling Repo.insert in app (purposefully leaving nil empty)...
For more info on how I got to this point see https://github.com/RobStallion/alog_adapter/issues/2
### Next steps - Add `insert/6` to the [Alog module](https://github.com/dwyl/alog/blob/master/lib/alog.ex). - Replace `params = params ++ [show: true]` with a function that adds the `cid` and `entry_id` values to the...
@Danwhy Thanks for responding on this. I realised that I made a typo sorry 😞 I was meant to say "Make sure the entry_id" is unique". I will update my...
@Danwhy Regarding [this comment](https://github.com/dwyl/alog/issues/45#issuecomment-465517999), good thinking 🧠 I'll make sure I add a check for that. Should be a fairly simple step 👍
@Danwhy Can we write a query like that in the adapter? I thought that it would give us the error we were getting when trying to use subquery. I will...