Experiment in the REPL The Beauty of Pattern Matching in Elixir

Soft delete with Ecto 3 and Postgres

One thing that folks sometimes want or need to do is to be able to “soft delete” records in a database. This means that instead of actually removing the record from a database, you in some way keep it there but make it “invisible” to your application.

There are many different ways of doing this, but I’ve recently settled on the way I think I’m going to do it from now on when I have applications on Ecto 3 and using Postgres. I’ve put together a little example application to show how it works, and that’s what I cover in this post:

http://devonestes.herokuapp.com/soft-delete-with-ecto-3-and-postgres