I am defining a schema for my user
and role
models in Phoenix app. Role has_many
users and user belongs_to
a role. It seems like there are 3 different on_delete:
options: nilify_all
, nothing
(default), and delete_all
.
When I look at Ecto.Schema page, I don't really find definition of what each does.
What is the difference between nilify_all
, nothing
, and delete_all
- when should I use each?