Post

Could you recommend an #ElixirLang library for tracking changes in the database, such as for audit purposes? I need it to work with Postgres and Ecto.

I just realized that, for my purposes, I don't even need Elixir or Ecto. Aside from the UI, this should be achievable with pure SQL. Lo and behold, ChatGPT provided exactly what I needed: a log of JSON-formatted differences for changes in selected tables.

0 reposts3 likes

I went for the opposite of overkill and ended up with a pure SQL solution (credits to Claude): bsky.app/profile/mxgr...

Elixir ▷ Max@mxgrn.com

Poor man's audit log for Postgres tables. Pure SQL, no Elixir required. Time-to-shelf: 1 minute. Run the final part for each table you want to audit. Use Postico as the UI. gist.github.com/mxgrn/9900c2...