You’re focusing too much on a contrived example. Here’s another one (also contrived). I want to be able to do something like this:
%ExampleSchema{id: 1, name: "Jane Smith", changed_name_at: nil}
|> change(name: "Jane J Smith")
|> put_sql_change(:changed_name_at, sql_fragment("NOW()"))
|> Repo.update(returning: [:changed_name_at])
If I wanted the date generated by the server, not the application, is there a way to do this either in a changeset or as an option in update (and similarly, with insert)?


















