geekmonkey
  • Home
  • About
  • Learn With Me: Julia
Sign in Subscribe

Elixir

A collection of 2 posts
How to update multiple records with different values in Ecto.Repo.update_all
Elixir

How to update multiple records with different values in Ecto.Repo.update_all

I recently ran into a problem where I wanted to update many database records with a single update_all/2. In this particular case, I was dealing with a table that leveraged parent_id to model a basic parent-child hierarchy. id parent_id name 1 NULL root 2 1 child
05 Aug 2024 1 min read
Detecting unused database columns using Ecto schemas
Elixir

Detecting unused database columns using Ecto schemas

When building large database-backed Elixir applications using Ecto, it is inevitable for your database schema to evolve over time. As your database schema changes, it's possible for there to be discrepancies between the tables in the database and your local schema definitions. Tracking inconsistencies between the schema defined
28 Apr 2023 2 min read
Page 1 of 1
geekmonkey © 2025
Powered by Ghost