Ecto.SoftDelete.Schema (ecto_soft_delete v2.1.0)
Contains schema macros to add soft delete fields to a schema
Summary
Functions
Adds the deleted_at column to a schema
Functions
Adds the deleted_at column to a schema
defmodule User do
use Ecto.Schema
import Ecto.SoftDelete.Schema
schema "users" do
field :email, :string
soft_delete_schema()
end
end
Options:
:auto_exclude_from_queries?
- If false, Ecto.SoftDelete.Repo won't automatically add the necessary clause to filter out soft-deleted rows. SeeEcto.SoftDelete.Repo.prepare_query
for more info. Defaults totrue
.