Post
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...
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...
I was going to suggest this same approach: triggers that convert the updated/deleted row to a JSON object that can be logged or archived. @brandur.bsky.social provides a great example in brandur.org/fragments/de...