Currently, I'm looking for the way to add SQL-statements logging while running mix
tasks. For example, commands such mix ecto.rollback
and mix ecto.migrate
outputs informative:
...
13:45:53.016 [info] == Running Repo.Migrations.AddAmountToUserResources.change/0 backward
13:45:53.016 [info] alter table user_resources
...
However instead of mysterious alter table user_resources
I'd like to see exact SQL-statements generated by ecto
which hits DB.
Is there any way to do that?
I've checked a couple of SO answers, which looks relevant (e.g. Disable Elixir Ecto Debug output). Unfortunately, they didn't help me in my case above. Thanks in advance.